[cfe-commits] r59820 - in /cfe/trunk/lib/Parse: ParseDeclCXX.cpp Parser.cpp
Douglas Gregor
doug.gregor at gmail.com
Fri Nov 21 08:10:19 PST 2008
Author: dgregor
Date: Fri Nov 21 10:10:08 2008
New Revision: 59820
URL: http://llvm.org/viewvc/llvm-project?rev=59820&view=rev
Log:
Tiny fix to the parsing of linkage-specifications
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
cfe/trunk/lib/Parse/Parser.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=59820&r1=59819&r2=59820&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Fri Nov 21 10:10:08 2008
@@ -98,7 +98,7 @@
/// '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 @@
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)) {
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=59820&r1=59819&r2=59820&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Fri Nov 21 10:10:08 2008
@@ -295,7 +295,7 @@
}
/// ParseExternalDeclaration:
-/// external-declaration: [C99 6.9]
+/// external-declaration: [C99 6.9], declaration: [C++ dcl.dcl]
/// function-definition
/// declaration
/// [EXT] ';'
@@ -307,7 +307,7 @@
/// [OBJC] objc-protocol-definition
/// [OBJC] objc-method-definition
/// [OBJC] @end
-///
+/// [C++] linkage-specification
/// [GNU] asm-definition:
/// simple-asm-expr ';'
///
More information about the cfe-commits
mailing list