summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-decl.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2025-07-16 23:43:06 -0700
committerGitHub <noreply@github.com>2025-07-17 06:43:06 +0000
commit020a16072923a66ae0985be618fd32310aa87242 (patch)
tree92eafa62d59c2fed44aa1afd47a14a31b88a22fe /source/slang/slang-check-decl.cpp
parent5937e1e6bb3afcf84b01abadcf1eb527933449f3 (diff)
Improve lookup performance. (#7798)
* Improve lookup performance. * Cleanup. * Improve autocompletion latency.
Diffstat (limited to 'source/slang/slang-check-decl.cpp')
-rw-r--r--source/slang/slang-check-decl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp
index a3662702a..46876131a 100644
--- a/source/slang/slang-check-decl.cpp
+++ b/source/slang/slang-check-decl.cpp
@@ -8870,6 +8870,8 @@ void SemanticsDeclBodyVisitor::visitEnumCaseDecl(EnumCaseDecl* decl)
auto parentEnumDecl = as<EnumDecl>(decl->parentDecl);
SLANG_ASSERT(parentEnumDecl);
+ ensureDecl(parentEnumDecl, DeclCheckState::ReadyForLookup);
+
decl->type.type = DeclRefType::create(m_astBuilder, makeDeclRef(parentEnumDecl));
// The tag type should have already been set by