[Clang[NFC] Fix bitmask for NullabilityPayload in Types.h
Found by PVS-Studio - https://pvs-studio.com/en/blog/posts/cpp/1003/, N37. The code you is using the bit mask NullabilityKindMask which is 0x3 (00000011 in binary) to clear the bits in the NullabilityPayload variable. Since NullabilityPayload is a 64-bit variable and NullabilityKindMask is only a 8-bit variable(0x3), it will only affect the last 8 bits of the variable. The higher 56 bits will remain unchanged. Differential Revision: https://reviews.llvm.org/D142334
Loading
Please sign in to comment