[PATCH] D67368: [NFCI]Create CommonAttributeInfo Type as base type of *Attr and ParsedAttr.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 10:02:08 PDT 2019


erichkeane marked an inline comment as done.
erichkeane added inline comments.


================
Comment at: clang/include/clang/Basic/Attr.td:2266
   let Spellings = [CXX11<"", "maybe_unused", 201603>, GCC<"unused">,
-                   C2x<"", "maybe_unused">];
+                   C2x<"", "maybe_unused">, Pragma<"", "unused">];
   let Subjects = SubjectList<[Var, ObjCIvar, Type, Enum, EnumConstant, Label,
----------------
aaron.ballman wrote:
> I'm surprised to see this as part of an NFC refactoring. Hopefully it will become more obvious later. :-D
Yep, was a separate bug I found while going through things.  I'll take it out and do it later.


================
Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:66-69
+  unsigned AttrKind : 16;
+  /// Corresponds to the Syntax enum.
+  unsigned SyntaxUsed : 3;
+  unsigned SpellingIndex : 4;
----------------
aaron.ballman wrote:
> Do you want to do `= 0` here to give them in-class initializers? (well, `SpellingIndex` should probably be `SpellingNotCalculated`).
Bitfield in-class initializers are a C++2a feature.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67368/new/

https://reviews.llvm.org/D67368





More information about the cfe-commits mailing list