[cfe-commits] r50322 - /cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Argiris Kirtzidis
akyrtzi at gmail.com
Sun Apr 27 07:10:57 PDT 2008
Author: akirtzidis
Date: Sun Apr 27 09:10:57 2008
New Revision: 50322
URL: http://llvm.org/viewvc/llvm-project?rev=50322&view=rev
Log:
Call ExitScope before ActOnFinishNamespaceDef.
This is the same for functions and it's preferable to have the namespace as DeclContext during ActOnPopScope.
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=50322&r1=50321&r2=50322&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Sun Apr 27 09:10:57 2008
@@ -74,11 +74,12 @@
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 {
More information about the cfe-commits
mailing list