From b714c08eb8342d4818732b0248710158714fadd5 Mon Sep 17 00:00:00 2001 From: Ryan Flynn Date: Wed, 22 Jul 2009 16:17:36 +0000 Subject: 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 --- unittests/Support/ConstantRangeTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'unittests/Support') 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); } -- cgit v1.2.3