[PATCH] D142334: [Clang[NFC] Fix bitmask for NullabilityPayload in Types.h

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 04:44:06 PST 2023


aaron.ballman added inline comments.


================
Comment at: clang/include/clang/APINotes/Types.h:535
     NullabilityPayload &=
-        ~(NullabilityKindMask << (index * NullabilityKindSize));
+        ~(static_cast<uint64_t>NullabilityKindMask << (index * NullabilityKindSize));
 
----------------
I think a cleaner way to solve this is to make `NullabilityKindMask` be 64-bits. None of the other operations need this change, but it seems like it will be a bit more future-proof that way. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142334



More information about the cfe-commits mailing list