[PATCH] D50630: [AST] Update/correct the static_asserts for the bit-fields in Type

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 13 06:19:03 PDT 2018


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


================
Comment at: include/clang/AST/Type.h:1639
+
+    static_assert(sizeof(TypeBitfields) <= 4,
+                  "TypeBitfields is larger than 4 bytes!");
----------------
erichkeane wrote:
> I don't really see value in ensuring that TypeBitfields is <= 4 bytes, it seems to me that all we care about is the union size, so just <=8 is fine.
I originally did this in the hope to provide more information
to someone who trigger one of the various static_assert.

But you are completely right that we only care about <= 8 bytes

Will update the diff with this change.


Repository:
  rC Clang

https://reviews.llvm.org/D50630





More information about the cfe-commits mailing list