From c9df734b836a503dbc09c48bfd54b35facd0f105 Mon Sep 17 00:00:00 2001 From: Yong He Date: Sat, 23 Mar 2024 11:25:51 -0700 Subject: Allow anonymous struct. (#3822) --- source/slang/slang-check-decl.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-check-decl.cpp') 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(decl)) @@ -1291,7 +1290,7 @@ namespace Slang if(as(childDecl)) continue; - _ensureAllDeclsRec(visitor, childDecl, state); + ensureAllDeclsRec(childDecl, state); } } @@ -1302,7 +1301,7 @@ namespace Slang // if(auto genericDecl = as(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 -- cgit v1.2.3