[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 06:22:02 PDT 2023


erichkeane added inline comments.


================
Comment at: clang/include/clang/AST/Type.h:3956
     /// [implimits] 8 bits would be enough here.
-    unsigned NumExceptionType = 0;
+    unsigned NumExceptionType : 16;
+
----------------
tbaeder wrote:
> Isn't using a `uint16_t` preferred over a bitfield?
Ah, thats a great point, yes, I think that is probably better here!  I like the assert on setting it (particularly because we're shrinking it!), but that idea makes this patch much smaller.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152140



More information about the cfe-commits mailing list