Skip to content

Commit cbc7d55

Browse files
committed
fix: Info::Namespace uses SymbolID::zero for global namespace
1 parent 0a698ff commit cbc7d55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/AST/ASTVisitor.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -1438,8 +1438,9 @@ class ASTVisitor
14381438
// it uses SymbolID::zero and should *always* exist
14391439
case Decl::TranslationUnit:
14401440
{
1441+
parent_id = SymbolID::zero;
14411442
auto [P, created] = getOrCreateInfo<
1442-
NamespaceInfo>(SymbolID::zero);
1443+
NamespaceInfo>(parent_id);
14431444
emplaceChild(P, child_id);
14441445
break;
14451446
}

0 commit comments

Comments
 (0)