aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-04-27 14:10:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-04-27 14:10:57 +0000
commitff871444421ad9fb8e7ddb73bc422912d9b0ee53 (patch)
tree005c79bbbfcfbc9ddb715ab7722f0b0ac09cf025 /lib/Parse/ParseDeclCXX.cpp
parent2d1c5d313cd0c229cc614e74baa4c5756a4b46f4 (diff)
Call ExitScope before ActOnFinishNamespaceDef.
This is the same for functions and it's preferable to have the namespace as DeclContext during ActOnPopScope. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 5d49f4dd59..475fb25842 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -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 {