diff options
Diffstat (limited to 'clang/include/clang')
-rw-r--r-- | clang/include/clang/Basic/DiagnosticParseKinds.td | 8 | ||||
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/clang/include/clang/Basic/DiagnosticParseKinds.td b/clang/include/clang/Basic/DiagnosticParseKinds.td index 5b53223e466..c183da7a6ac 100644 --- a/clang/include/clang/Basic/DiagnosticParseKinds.td +++ b/clang/include/clang/Basic/DiagnosticParseKinds.td @@ -464,10 +464,10 @@ def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">, def warn_cxx98_compat_attribute : Warning< "attributes are incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; -def err_cxx0x_attribute_forbids_arguments : Error< - "C++11 attribute '%0' cannot have an argument list">; -def err_cxx0x_attribute_requires_arguments : Error< - "C++11 attribute '%0' must have an argument list">; +def err_cxx11_attribute_forbids_arguments : Error< + "attribute '%0' cannot have an argument list">; +def err_cxx11_attribute_forbids_ellipsis : Error< + "attribute '%0' cannot be used as an attribute pack">; def err_attributes_not_allowed : Error<"an attribute list cannot appear here">; def err_l_square_l_square_not_attribute : Error< "C++11 only allows consecutive left square brackets when " diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 5e070e4f36c..e599207c249 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -1907,7 +1907,7 @@ private: if (getLangOpts().CPlusPlus0x && isCXX11AttributeSpecifier()) { ParsedAttributesWithRange attrs(AttrFactory); SourceLocation endLoc; - ParseCXX0XAttributes(attrs, &endLoc); + ParseCXX11Attributes(attrs, &endLoc); D.takeAttributes(attrs, endLoc); } } @@ -1915,7 +1915,7 @@ private: SourceLocation *endLoc = 0) { if (getLangOpts().CPlusPlus0x && isCXX11AttributeSpecifier()) { ParsedAttributesWithRange attrsWithRange(AttrFactory); - ParseCXX0XAttributes(attrsWithRange, endLoc); + ParseCXX11Attributes(attrsWithRange, endLoc); attrs.takeAllFrom(attrsWithRange); } } @@ -1924,13 +1924,14 @@ private: bool OuterMightBeMessageSend = false) { if (getLangOpts().CPlusPlus0x && isCXX11AttributeSpecifier(false, OuterMightBeMessageSend)) - ParseCXX0XAttributes(attrs, endLoc); + ParseCXX11Attributes(attrs, endLoc); } - void ParseCXX0XAttributeSpecifier(ParsedAttributes &attrs, + void ParseCXX11AttributeSpecifier(ParsedAttributes &attrs, SourceLocation *EndLoc = 0); - void ParseCXX0XAttributes(ParsedAttributesWithRange &attrs, + void ParseCXX11Attributes(ParsedAttributesWithRange &attrs, SourceLocation *EndLoc = 0); + IdentifierInfo *TryParseCXX11AttributeIdentifier(SourceLocation &Loc); void MaybeParseMicrosoftAttributes(ParsedAttributes &attrs, SourceLocation *endLoc = 0) { |