summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-expr.cpp')
-rw-r--r--source/slang/slang-check-expr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp
index 511834cef..b8e68e28b 100644
--- a/source/slang/slang-check-expr.cpp
+++ b/source/slang/slang-check-expr.cpp
@@ -290,6 +290,13 @@ void addSiblingScopeForContainerDecl(ASTBuilder* builder, Scope* destScope, Cont
destScope->nextSibling = subScope;
}
+ContainerDecl* isStaticScopeDecl(Decl* decl)
+{
+ if (as<NamespaceDeclBase>(decl) || as<FileDecl>(decl))
+ return as<ContainerDecl>(decl);
+ return nullptr;
+}
+
void SemanticsVisitor::diagnoseDeprecatedDeclRefUsage(
DeclRef<Decl> declRef,
SourceLoc loc,