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

Shivam Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 04:55:19 PST 2023


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


================
Comment at: clang/include/clang/APINotes/Types.h:535
     NullabilityPayload &=
-        ~(NullabilityKindMask << (index * NullabilityKindSize));
+        ~(static_cast<uint64_t>NullabilityKindMask << (index * NullabilityKindSize));
 
----------------
aaron.ballman wrote:
> 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?
Yeah, I do agree. Thanks for the suggestion.


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