aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-21 16:10:08 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-21 16:10:08 +0000
commitc19923dda3d28f67aab4726cd40bb07032758383 (patch)
treeb82dfa31e8d7c8e2f78d85bf6032f4b7ceefabd3
parent1ca50c3f541dd637063b9d186a7ea193e3440a48 (diff)
Tiny fix to the parsing of linkage-specifications
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59820 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Parse/ParseDeclCXX.cpp4
-rw-r--r--lib/Parse/Parser.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 560edc131b..17f5763c1d 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/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<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)) {
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 861609ce75..86c29760d4 100644
--- a/lib/Parse/Parser.cpp
+++ b/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 ';'
///