[PATCH] D134286: [C2x] implement typeof and typeof_unqual

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 21 06:09:21 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/include/clang/AST/Type.h:1902
     AutoTypeBitfields AutoTypeBits;
+    TypeOfBitfields TypeOfBits;
     BuiltinTypeBitfields BuiltinTypeBits;
----------------
aaron.ballman wrote:
> erichkeane wrote:
> > So the downside to doing the bitfields is that EVERY 'Type' pays for them, or at least, pays for the largest one.  As this is a rarely used and 'leaf' AST node, I would say using the bitfields for this is at minimum 'unnecessary'.
> > 
> > That said, I doubt it is the 'biggest one', so I could go either way.
> This is a union of objects, I'm certain all of them are at least one bit wide, so we're not adding to any extra overhead, we're taking advantage of the overhead we're already paying for.
Yep, this was a 'general lament'.  Sorry for not being more clear.


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

https://reviews.llvm.org/D134286



More information about the cfe-commits mailing list