[PATCH] D50531: [NFC] Convert ParsedAttr to use llvm::TrailingObjects

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 9 13:57:01 PDT 2018


riccibruno added a comment.

Some inline comments. Since you already committed it I don't think it
is worth bothering with them.



================
Comment at: cfe/trunk/include/clang/Sema/ParsedAttr.h:124
+      detail::TypeTagForDatatypeData, ParsedType, detail::PropertyData>;
+
+  size_t numTrailingObjects(OverloadToken<ArgsUnion>) const { return NumArgs; }
----------------
I think you can do something like `friend TrailingObjects;`
like most (every ?) other users of `TrailingObjects` do. It relies on the
injected class name if I am not mistaken.


================
Comment at: cfe/trunk/include/clang/Sema/ParsedAttr.h:366
   ParsedAttr &operator=(const ParsedAttr &) = delete;
   ~ParsedAttr() = delete;
 
----------------
And maybe it would be nice to delete explicitly the move
ctor/assignment op too (my turn to make this remark :) ).
They are already not declared I think so it do not really matter.


Repository:
  rL LLVM

https://reviews.llvm.org/D50531





More information about the cfe-commits mailing list