Skip to content

Commit 4d97270

Browse files
committed
Use llvm::popcount instead of __builtin_popcount.
This fixes the windows build with MSVC.
1 parent c5e5f88 commit 4d97270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/unittests/Tooling/BoundsSafetyBringupMissingChecks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ TEST(BoundsSafetyBringUpMissingChecks, ChkPairValidMask) {
179179
static_assert(LangOptions::BS_CHK_None == 0, "expected 0");
180180
for (size_t Idx = 0; Idx < NumChkDescs; ++Idx) {
181181
unsigned CurrentMask = CheckKinds[Idx].Mask;
182-
EXPECT_EQ(__builtin_popcount(CurrentMask), 1); // Check is a power of 2
182+
EXPECT_EQ(llvm::popcount(CurrentMask), 1); // Check is a power of 2
183183
EXPECT_EQ(SeenBits & CurrentMask,
184184
0U); // Doesn't overlap with a previously seen value
185185
SeenBits |= CurrentMask;

0 commit comments

Comments
 (0)