[cfe-commits] r41403 - in /cfe/trunk/Parse: ParseDeclCXX.cpp Parser.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 25 11:15:17 PDT 2007
Author: lattner
Date: Sat Aug 25 13:15:16 2007
New Revision: 41403
URL: http://llvm.org/viewvc/llvm-project?rev=41403&view=rev
Log:
read and ignore the body of a namespace.
Modified:
cfe/trunk/Parse/ParseDeclCXX.cpp
cfe/trunk/Parse/Parser.cpp
Modified: cfe/trunk/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseDeclCXX.cpp?rev=41403&r1=41402&r2=41403&view=diff
==============================================================================
--- cfe/trunk/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/Parse/ParseDeclCXX.cpp Sat Aug 25 13:15:16 2007
@@ -64,7 +64,10 @@
SourceLocation LBrace = ConsumeBrace();
// FIXME: push a scope, push a namespace decl.
- // FIXME: Parse namespace-body
+ while (Tok.getKind() != tok::r_brace && Tok.getKind() != tok::eof) {
+ // FIXME capture the decls.
+ ParseExternalDeclaration();
+ }
SourceLocation RBrace = MatchRHSPunctuation(tok::r_brace, LBrace);
Modified: cfe/trunk/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/Parser.cpp?rev=41403&r1=41402&r2=41403&view=diff
==============================================================================
--- cfe/trunk/Parse/Parser.cpp (original)
+++ cfe/trunk/Parse/Parser.cpp Sat Aug 25 13:15:16 2007
@@ -340,7 +340,7 @@
return 0;
case tok::kw_namespace:
case tok::kw_typedef:
- // A function definition cannot start with a 'typedef' keyword.
+ // A function definition cannot start with a these keywords.
return ParseDeclaration(Declarator::FileContext);
default:
// We can't tell whether this is a function-definition or declaration yet.
More information about the cfe-commits
mailing list