diff options
Diffstat (limited to 'clang/include/clang/Parse')
-rw-r--r-- | clang/include/clang/Parse/Parser.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index e5511a17fa2..ff4d46e6acf 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -1814,6 +1814,17 @@ private: return DiagnoseProhibitedCXX11Attribute(); } bool DiagnoseProhibitedCXX11Attribute(); + void CheckMisplacedCXX11Attribute(ParsedAttributesWithRange &Attrs, + SourceLocation CorrectLocation) { + if (!getLangOpts().CPlusPlus11) + return; + if ((Tok.isNot(tok::l_square) || NextToken().isNot(tok::l_square)) && + Tok.isNot(tok::kw_alignas)) + return; + DiagnoseMisplacedCXX11Attribute(Attrs, CorrectLocation); + } + void DiagnoseMisplacedCXX11Attribute(ParsedAttributesWithRange &Attrs, + SourceLocation CorrectLocation); void ProhibitAttributes(ParsedAttributesWithRange &attrs) { if (!attrs.Range.isValid()) return; @@ -2059,7 +2070,7 @@ private: ParsedAttributesWithRange &Attributes); void ParseCXXMemberSpecification(SourceLocation StartLoc, SourceLocation AttrFixitLoc, - ParsedAttributes &Attrs, + ParsedAttributesWithRange &Attrs, unsigned TagType, Decl *TagDecl); ExprResult ParseCXXMemberInitializer(Decl *D, bool IsFunction, |