diff options
author | Erich Keane <erich.keane@intel.com> | 2019-09-13 17:39:31 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-09-13 17:39:31 +0000 |
commit | 063c2472faf6c009cbff5853273c9eff14cb9160 (patch) | |
tree | 16f876986d482ea80afe5900f9ffd168aeeb61c1 /lib/Parse/ParseDecl.cpp | |
parent | ff6d4b99884f00b21ab70231801f8b156f5d738a (diff) | |
download | clang-063c2472faf6c009cbff5853273c9eff14cb9160.tar.gz |
[NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.
In order to enable future improvements to our attribute diagnostics,
this moves info from ParsedAttr into CommonAttributeInfo, then makes
this type the base of the *Attr and ParsedAttr types. Quite a bit of
refactoring took place, including removing a bunch of redundant Spelling
Index propogation.
Differential Revision: https://reviews.llvm.org/D67368
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 068964cbf8..14cbd0cd54 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -347,7 +347,7 @@ unsigned Parser::ParseAttributeArgsCommon( bool IsIdentifierArg = attributeHasIdentifierArg(*AttrName) || attributeHasVariadicIdentifierArg(*AttrName); ParsedAttr::Kind AttrKind = - ParsedAttr::getKind(AttrName, ScopeName, Syntax); + ParsedAttr::getParsedKind(AttrName, ScopeName, Syntax); // If we don't know how to parse this attribute, but this is the only // token in this argument, assume it's meant to be an identifier. @@ -438,7 +438,7 @@ void Parser::ParseGNUAttributeArgs(IdentifierInfo *AttrName, assert(Tok.is(tok::l_paren) && "Attribute arg list not starting with '('"); ParsedAttr::Kind AttrKind = - ParsedAttr::getKind(AttrName, ScopeName, Syntax); + ParsedAttr::getParsedKind(AttrName, ScopeName, Syntax); if (AttrKind == ParsedAttr::AT_Availability) { ParseAvailabilityAttribute(*AttrName, AttrNameLoc, Attrs, EndLoc, ScopeName, @@ -488,7 +488,7 @@ unsigned Parser::ParseClangAttributeArgs( assert(Tok.is(tok::l_paren) && "Attribute arg list not starting with '('"); ParsedAttr::Kind AttrKind = - ParsedAttr::getKind(AttrName, ScopeName, Syntax); + ParsedAttr::getParsedKind(AttrName, ScopeName, Syntax); switch (AttrKind) { default: @@ -1689,9 +1689,9 @@ void Parser::ProhibitCXX11Attributes(ParsedAttributesWithRange &Attrs, if (!AL.isCXX11Attribute() && !AL.isC2xAttribute()) continue; if (AL.getKind() == ParsedAttr::UnknownAttribute) - Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored) << AL.getName(); + Diag(AL.getLoc(), diag::warn_unknown_attribute_ignored) << AL; else { - Diag(AL.getLoc(), DiagID) << AL.getName(); + Diag(AL.getLoc(), DiagID) << AL; AL.setInvalid(); } } |