Skip to content

Commit

Permalink
fix: Info::Namespace uses SymbolID::zero for global namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkrystian committed Jul 17, 2023
1 parent 0a698ff commit cbc7d55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,9 @@ class ASTVisitor
// it uses SymbolID::zero and should *always* exist
case Decl::TranslationUnit:
{
parent_id = SymbolID::zero;
auto [P, created] = getOrCreateInfo<
NamespaceInfo>(SymbolID::zero);
NamespaceInfo>(parent_id);
emplaceChild(P, child_id);
break;
}
Expand Down

0 comments on commit cbc7d55

Please sign in to comment.