summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
authorvenkataram-nv <vedavamadath@nvidia.com>2024-07-18 17:43:19 -0700
committerGitHub <noreply@github.com>2024-07-18 17:43:19 -0700
commit6e7c726658c775e97578e7a9dd99d23b819870bd (patch)
tree67d00d82a910068ba0da0cf230909eade09735a4 /source/slang/slang-check-decl.cpp
parent831d79654996b3d1e9af3ca0cc580f71997eb346 (diff)
Warnings for uninitialized fields in constructors (#4680)
* Detect uninitialized fields in constructors * Reachability check for early returns * Specialized warnings for synthesized default initializers * Handling quirks with constructors * Addressing review comments * Ignore synthesized constructors if they are not used
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index 99aecd37c..59d8ba8b3 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -1813,6 +1813,7 @@ namespace Slang
body->closingSourceLoc = ctor->closingSourceLoc;
ctor->body = body;
body->body = m_astBuilder->create<SeqStmt>();
+ ctor->isSynthesized = true;
decl->addMember(ctor);
return ctor;
}