Skip to content

Commit 56bed13

Browse files
authored
Merge pull request #11092 from hjyamauchi/winfix-next
Fix windows build failures with MSVC
2 parents 62fcc40 + 7524778 commit 56bed13

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/include/clang/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ class LangOptionsBase {
458458
};
459459

460460
/* TODO(BoundsSafety) Deprecate the flag */
461-
enum BoundsSafetyNewChecks {
461+
enum BoundsSafetyNewChecks : unsigned {
462462
BS_CHK_None = 0,
463463

464464
BS_CHK_AccessSize = 1 << 0, // rdar://72252593

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)