summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-24 14:14:45 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-24 14:14:45 +0000
commit117db7e95ad63750f3543df5d2997844da5f1eb3 (patch)
tree8c2b2dfb7bf41ca86b1a5febfa551ccd02f5ac38 /clang/lib/Parse/Parser.cpp
parent7e25bc4145d0cbdff083cf81fd39e958f8beb10e (diff)
downloadbcm5719-llvm-117db7e95ad63750f3543df5d2997844da5f1eb3.tar.gz
bcm5719-llvm-117db7e95ad63750f3543df5d2997844da5f1eb3.zip
Parse all kinds of declarations as part of a linkage-specification,
from Francois Pichet! Fixes PR7754. llvm-svn: 111912
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index 2f5070c4c39..8fd1e489944 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -405,7 +405,8 @@ void Parser::ParseTranslationUnit() {
/// ';'
///
/// [C++0x/GNU] 'extern' 'template' declaration
-Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr) {
+Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr,
+ ParsingDeclSpec *DS) {
ParenBraceBracketBalancer BalancerRAIIObj(*this);
Decl *SingleDecl = 0;
@@ -494,7 +495,10 @@ Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr)
default:
// We can't tell whether this is a function-definition or declaration yet.
- return ParseDeclarationOrFunctionDefinition(Attr.AttrList);
+ if (DS)
+ return ParseDeclarationOrFunctionDefinition(*DS, Attr.AttrList);
+ else
+ return ParseDeclarationOrFunctionDefinition(Attr.AttrList);
}
// This routine returns a DeclGroup, if the thing we parsed only contains a
OpenPOWER on IntegriCloud