From 15799fd21012e553546f074dcac6c9f7fe8fb051 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 21 Nov 2008 16:10:08 +0000 Subject: [PATCH] Tiny fix to the parsing of linkage-specifications llvm-svn: 59820 --- clang/lib/Parse/ParseDeclCXX.cpp | 4 ++-- clang/lib/Parse/Parser.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 560edc131b05..17f5763c1d60 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -98,7 +98,7 @@ Parser::DeclTy *Parser::ParseNamespace(unsigned Context) { /// 'extern' string-literal declaration /// Parser::DeclTy *Parser::ParseLinkage(unsigned Context) { - assert(Tok.is(tok::string_literal) && "Not a stringliteral!"); + assert(Tok.is(tok::string_literal) && "Not a string literal!"); llvm::SmallVector LangBuffer; // LangBuffer is guaranteed to be big enough. LangBuffer.resize(Tok.getLength()); @@ -110,7 +110,7 @@ Parser::DeclTy *Parser::ParseLinkage(unsigned Context) { SourceLocation LBrace, RBrace; if (Tok.isNot(tok::l_brace)) { - D = ParseDeclaration(Context); + D = ParseDeclarationOrFunctionDefinition(); } else { LBrace = ConsumeBrace(); while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 861609ce7538..86c29760d478 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -295,7 +295,7 @@ void Parser::ParseTranslationUnit() { } /// ParseExternalDeclaration: -/// external-declaration: [C99 6.9] +/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl] /// function-definition /// declaration /// [EXT] ';' @@ -307,7 +307,7 @@ void Parser::ParseTranslationUnit() { /// [OBJC] objc-protocol-definition /// [OBJC] objc-method-definition /// [OBJC] @end -/// +/// [C++] linkage-specification /// [GNU] asm-definition: /// simple-asm-expr ';' ///