Tiny fix to the parsing of linkage-specifications

llvm-svn: 59820
This commit is contained in:
Douglas Gregor 2008-11-21 16:10:08 +00:00
parent b81897cda6
commit 15799fd210
2 changed files with 4 additions and 4 deletions

View File

@ -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<char, 8> 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)) {

View File

@ -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 ';'
///