[llvm] 58f944c - Fix signed/unsigned comparison warnings on ppc buildbots
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 8 05:57:20 PST 2022
Author: Simon Pilgrim
Date: 2022-02-08T13:56:41Z
New Revision: 58f944cf0ba8bd7425cedb09888516404e907813
URL: https://github.com/llvm/llvm-project/commit/58f944cf0ba8bd7425cedb09888516404e907813
DIFF: https://github.com/llvm/llvm-project/commit/58f944cf0ba8bd7425cedb09888516404e907813.diff
LOG: Fix signed/unsigned comparison warnings on ppc buildbots
Added:
Modified:
llvm/unittests/ADT/APIntTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index 566ceabf3f569..3eff0771ee6d5 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -1767,22 +1767,22 @@ TEST(APIntTest, isShiftedMask) {
APInt MaskVal = One.shl(I) - 1;
EXPECT_TRUE(MaskVal.isShiftedMask());
EXPECT_TRUE(MaskVal.isShiftedMask(MaskIdx, MaskLen));
- EXPECT_EQ(0, MaskIdx);
- EXPECT_EQ(I, MaskLen);
+ EXPECT_EQ(0, (int)MaskIdx);
+ EXPECT_EQ(I, (int)MaskLen);
}
for (int I = 1; I < N - 1; ++I) {
APInt MaskVal = One.shl(I);
EXPECT_TRUE(MaskVal.isShiftedMask());
EXPECT_TRUE(MaskVal.isShiftedMask(MaskIdx, MaskLen));
- EXPECT_EQ(I, MaskIdx);
- EXPECT_EQ(1, MaskLen);
+ EXPECT_EQ(I, (int)MaskIdx);
+ EXPECT_EQ(1, (int)MaskLen);
}
for (int I = 1; I < N; ++I) {
APInt MaskVal = APInt::getHighBitsSet(N, I);
EXPECT_TRUE(MaskVal.isShiftedMask());
EXPECT_TRUE(MaskVal.isShiftedMask(MaskIdx, MaskLen));
- EXPECT_EQ(N - I, MaskIdx);
- EXPECT_EQ(I, MaskLen);
+ EXPECT_EQ(N - I, (int)MaskIdx);
+ EXPECT_EQ(I, (int)MaskLen);
}
}
}
More information about the llvm-commits
mailing list