Skip to content
Commit 68b89083 authored by Shivam Gupta's avatar Shivam Gupta
Browse files

[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
parent 073401e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment