summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorAlexis Hunt <alercah@gmail.com>2012-06-18 16:13:52 +0000
committerAlexis Hunt <alercah@gmail.com>2012-06-18 16:13:52 +0000
commita0e54d453b843c424a0558cc1478b80ea3f4ab2b (patch)
tree3d242802f2a846194bf712206c5c9605ba7000a8 /clang/lib/Parse/ParseDeclCXX.cpp
parentb7c941bad9b77d1456c2f5d01fca58dd641a5c01 (diff)
downloadbcm5719-llvm-a0e54d453b843c424a0558cc1478b80ea3f4ab2b.tar.gz
bcm5719-llvm-a0e54d453b843c424a0558cc1478b80ea3f4ab2b.zip
Handle C++11 attribute namespaces automatically.
Now, as long as the 'Namespaces' variable is correct inside Attr.td, the generated code will correctly admit a C++11 attribute only when it has the appropriate namespace(s). llvm-svn: 158661
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseDeclCXX.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index 88aa3982fb7..b9062927c6f 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -907,7 +907,7 @@ void Parser::ParseMicrosoftInheritanceClassAttributes(ParsedAttributes &attrs) {
IdentifierInfo *AttrName = Tok.getIdentifierInfo();
SourceLocation AttrNameLoc = ConsumeToken();
attrs.addNew(AttrName, AttrNameLoc, 0, AttrNameLoc, 0,
- SourceLocation(), 0, 0, false);
+ SourceLocation(), 0, 0, AttributeList::AS_GNU);
}
}
@@ -2899,12 +2899,13 @@ void Parser::ParseCXX11AttributeSpecifier(ParsedAttributes &attrs,
}
bool AttrParsed = false;
- switch (AttributeList::getKind(AttrName, ScopeName)) {
+ switch (AttributeList::getKind(AttrName, ScopeName,
+ AttributeList::AS_CXX11)) {
// No arguments
case AttributeList::AT_carries_dependency:
// FIXME: implement generic support of attributes with C++11 syntax
// see Parse/ParseDecl.cpp: ParseGNUAttributes
- case AttributeList::AT_clang___fallthrough:
+ case AttributeList::AT_fallthrough:
case AttributeList::AT_noreturn: {
if (Tok.is(tok::l_paren)) {
Diag(Tok.getLocation(), diag::err_cxx11_attribute_forbids_arguments)
@@ -2916,7 +2917,7 @@ void Parser::ParseCXX11AttributeSpecifier(ParsedAttributes &attrs,
SourceRange(ScopeLoc.isValid() ? ScopeLoc : AttrLoc,
AttrLoc),
ScopeName, ScopeLoc, 0,
- SourceLocation(), 0, 0, false, true);
+ SourceLocation(), 0, 0, AttributeList::AS_CXX11);
AttrParsed = true;
break;
}
OpenPOWER on IntegriCloud