We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ef4e792 + 285e2c1 commit 73514c1Copy full SHA for 73514c1
clang/include/clang/Basic/Sanitizers.h
@@ -52,10 +52,11 @@ class SanitizerMask {
52
53
/// Create a mask with a bit enabled at position Pos.
54
static constexpr SanitizerMask bitPosToMask(const unsigned Pos) {
55
- return SanitizerMask((Pos < kNumBitElem) ? 1ULL << Pos % kNumBitElem : 0,
56
- (Pos >= kNumBitElem && Pos < kNumBitElem * 2)
57
- ? 1ULL << Pos % kNumBitElem
58
- : 0);
+ uint64_t mask1 = (Pos < kNumBitElem) ? 1ULL << (Pos % kNumBitElem) : 0;
+ uint64_t mask2 = (Pos >= kNumBitElem && Pos < (kNumBitElem * 2))
+ ? 1ULL << (Pos % kNumBitElem)
+ : 0;
59
+ return SanitizerMask(mask1, mask2);
60
}
61
62
unsigned countPopulation() const {
0 commit comments