diff --git a/clang/Parse/ParseDeclCXX.cpp b/clang/Parse/ParseDeclCXX.cpp index 50f0c2a28d8cc1452f86e0511caadc434a39920a..73ae790153af3f732c7fa007ec543de6150dcac1 100644 --- a/clang/Parse/ParseDeclCXX.cpp +++ b/clang/Parse/ParseDeclCXX.cpp @@ -64,7 +64,10 @@ Parser::DeclTy *Parser::ParseNamespace(unsigned Context) { 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); diff --git a/clang/Parse/Parser.cpp b/clang/Parse/Parser.cpp index 0991675481e1fba1eccd893ba64a86d5f5123c54..d9d79613d24443e7711a48bfc45af422c7309c09 100644 --- a/clang/Parse/Parser.cpp +++ b/clang/Parse/Parser.cpp @@ -340,7 +340,7 @@ Parser::DeclTy *Parser::ParseExternalDeclaration() { 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.