[llvm-commits] [llvm] r76744 - /llvm/trunk/unittests/Support/ConstantRangeTest.cpp
Ryan Flynn
pizza at parseerror.com
Wed Jul 22 09:17:36 PDT 2009
Author: pizza
Date: Wed Jul 22 11:17:36 2009
New Revision: 76744
URL: http://llvm.org/viewvc/llvm-project?rev=76744&view=rev
Log:
cast signed APInt constructor params to uint64_t to suppress signedness warning
Modified:
llvm/trunk/unittests/Support/ConstantRangeTest.cpp
Modified: llvm/trunk/unittests/Support/ConstantRangeTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/ConstantRangeTest.cpp?rev=76744&r1=76743&r2=76744&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/ConstantRangeTest.cpp (original)
+++ llvm/trunk/unittests/Support/ConstantRangeTest.cpp Wed Jul 22 11:17:36 2009
@@ -133,10 +133,10 @@
EXPECT_EQ(Some.getSignedMax(), APInt(16, 0xaa9));
EXPECT_EQ(Wrap.getSignedMax(), APInt(16, INT16_MAX));
- EXPECT_EQ(Full.getSignedMin(), APInt(16, INT16_MIN));
+ EXPECT_EQ(Full.getSignedMin(), APInt(16, (uint64_t)INT16_MIN));
EXPECT_EQ(One.getSignedMin(), APInt(16, 0xa));
EXPECT_EQ(Some.getSignedMin(), APInt(16, 0xa));
- EXPECT_EQ(Wrap.getSignedMin(), APInt(16, INT16_MIN));
+ EXPECT_EQ(Wrap.getSignedMin(), APInt(16, (uint64_t)INT16_MIN));
// Found by Klee
EXPECT_EQ(ConstantRange(APInt(4, 7), APInt(4, 0)).getSignedMax(),
@@ -178,7 +178,7 @@
ConstantRange SOne = One.signExtend(20);
ConstantRange SSome = Some.signExtend(20);
ConstantRange SWrap = Wrap.signExtend(20);
- EXPECT_EQ(SFull, ConstantRange(APInt(20, INT16_MIN, true),
+ EXPECT_EQ(SFull, ConstantRange(APInt(20, (uint64_t)INT16_MIN, true),
APInt(20, INT16_MAX + 1, true)));
EXPECT_TRUE(SEmpty.isEmptySet());
EXPECT_EQ(SOne, ConstantRange(APInt(One.getLower()).sext(20),
@@ -321,10 +321,10 @@
EXPECT_EQ(Empty.smax(One), Empty);
EXPECT_EQ(Some.smax(Some), Some);
EXPECT_EQ(Some.smax(Wrap), ConstantRange(APInt(16, 0xa),
- APInt(16, INT16_MIN)));
+ APInt(16, (uint64_t)INT16_MIN)));
EXPECT_EQ(Some.smax(One), Some);
EXPECT_EQ(Wrap.smax(One), ConstantRange(APInt(16, 0xa),
- APInt(16, INT16_MIN)));
+ APInt(16, (uint64_t)INT16_MIN)));
EXPECT_EQ(One.smax(One), One);
}
More information about the llvm-commits
mailing list