Call ExitScope before ActOnFinishNamespaceDef.
This is the same for functions and it's preferable to have the namespace as DeclContext during ActOnPopScope. llvm-svn: 50322
This commit is contained in:
parent
081148986a
commit
8eab584388
|
@ -74,11 +74,12 @@ Parser::DeclTy *Parser::ParseNamespace(unsigned Context) {
|
|||
while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof))
|
||||
ParseExternalDeclaration();
|
||||
|
||||
// Leave the namespace scope.
|
||||
ExitScope();
|
||||
|
||||
SourceLocation RBrace = MatchRHSPunctuation(tok::r_brace, LBrace);
|
||||
Actions.ActOnFinishNamespaceDef(NamespcDecl, RBrace);
|
||||
|
||||
ExitScope();
|
||||
|
||||
return NamespcDecl;
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue