summaryrefslogtreecommitdiff
path: root/unittests/Support
diff options
context:
space:
mode:
authorRyan Flynn <pizza@parseerror.com>2009-07-22 16:17:36 +0000
committerRyan Flynn <pizza@parseerror.com>2009-07-22 16:17:36 +0000
commitb714c08eb8342d4818732b0248710158714fadd5 (patch)
tree2cd87d462119a7e7bddcb53007b20c341b74a710 /unittests/Support
parenta92669737372dc4374e8e8e3397bdf3fcc799c51 (diff)
cast signed APInt constructor params to uint64_t to suppress signedness warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support')
-rw-r--r--unittests/Support/ConstantRangeTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittests/Support/ConstantRangeTest.cpp b/unittests/Support/ConstantRangeTest.cpp
index b1b82a9927..af01276bf7 100644
--- a/unittests/Support/ConstantRangeTest.cpp
+++ b/unittests/Support/ConstantRangeTest.cpp
@@ -133,10 +133,10 @@ TEST_F(ConstantRangeTest, GetMinsAndMaxes) {
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 @@ TEST_F(ConstantRangeTest, SExt) {
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 @@ TEST_F(ConstantRangeTest, SMax) {
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);
}