forked from OSchip/llvm-project
Tiny fix to the parsing of linkage-specifications
llvm-svn: 59820
This commit is contained in:
parent
b81897cda6
commit
15799fd210
|
@ -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)) {
|
||||
|
|
|
@ -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 ';'
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue