summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-08-27 23:12:46 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-08-27 23:12:46 +0000
commit6766794c0b91f2fc28555a175052a731908722a6 (patch)
treef02fb7613d19f1b386b39d8428a640239ebcdc51 /clang/lib/Parse/Parser.cpp
parent5bfe034ecc51dda1af94f3861a3e545d93522ab4 (diff)
downloadbcm5719-llvm-6766794c0b91f2fc28555a175052a731908722a6.tar.gz
bcm5719-llvm-6766794c0b91f2fc28555a175052a731908722a6.zip
Parser support for inline namespaces
llvm-svn: 112320
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index a5002b01192..54053435322 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -482,6 +482,15 @@ Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr,
SourceLocation DeclEnd;
return ParseDeclaration(Declarator::FileContext, DeclEnd, Attr);
}
+
+ case tok::kw_inline:
+ if (getLang().CPlusPlus0x && NextToken().is(tok::kw_namespace)) {
+ // Inline namespaces
+ SourceLocation DeclEnd;
+ return ParseDeclaration(Declarator::FileContext, DeclEnd, Attr);
+ }
+ goto dont_know;
+
case tok::kw_extern:
if (getLang().CPlusPlus && NextToken().is(tok::kw_template)) {
// Extern templates
@@ -491,12 +500,11 @@ Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr,
return Actions.ConvertDeclToDeclGroup(
ParseExplicitInstantiation(ExternLoc, TemplateLoc, DeclEnd));
}
-
// FIXME: Detect C++ linkage specifications here?
-
- // Fall through to handle other declarations or function definitions.
+ goto dont_know;
default:
+ dont_know:
// We can't tell whether this is a function-definition or declaration yet.
if (DS)
return ParseDeclarationOrFunctionDefinition(*DS, Attr.AttrList);
OpenPOWER on IntegriCloud