summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-03-23 11:25:51 -0700
committerGitHub <noreply@github.com>2024-03-23 11:25:51 -0700
commitc9df734b836a503dbc09c48bfd54b35facd0f105 (patch)
tree165ecf9668e2f25d71e4327dd24c5de7dfd698dc /source/slang/slang-check-decl.cpp
parenta23adc221b1ea26db3f3313226b629eb9e308b0f (diff)
Allow anonymous struct. (#3822)
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index c117dbc14..386a0bba1 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -1261,13 +1261,12 @@ namespace Slang
/// because those cannot be meaningfully checked outside of the context
/// of their surrounding statement(s).
///
- static void _ensureAllDeclsRec(
- SemanticsDeclVisitorBase* visitor,
+ void SemanticsVisitor::ensureAllDeclsRec(
Decl* decl,
DeclCheckState state)
{
// Ensure `decl` itself first.
- visitor->ensureDecl(decl, state);
+ ensureDecl(decl, state);
// If `decl` is a container, then we want to ensure its children.
if(auto containerDecl = as<ContainerDecl>(decl))
@@ -1291,7 +1290,7 @@ namespace Slang
if(as<ScopeDecl>(childDecl))
continue;
- _ensureAllDeclsRec(visitor, childDecl, state);
+ ensureAllDeclsRec(childDecl, state);
}
}
@@ -1302,7 +1301,7 @@ namespace Slang
//
if(auto genericDecl = as<GenericDecl>(decl))
{
- _ensureAllDeclsRec(visitor, genericDecl->inner, state);
+ ensureAllDeclsRec(genericDecl->inner, state);
}
}
@@ -2561,7 +2560,7 @@ namespace Slang
// to the subset of declarations coming from a given source
// file.
//
- _ensureAllDeclsRec(this, moduleDecl, s);
+ ensureAllDeclsRec(moduleDecl, s);
}
// Once we have completed the above loop, all declarations not