llvm.org GIT mirror llvm / b714c08
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 Ryan Flynn 10 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
132132 EXPECT_EQ(Some.getSignedMax(), APInt(16, 0xaa9));
133133 EXPECT_EQ(Wrap.getSignedMax(), APInt(16, INT16_MAX));
134134
135 EXPECT_EQ(Full.getSignedMin(), APInt(16, INT16_MIN));
135 EXPECT_EQ(Full.getSignedMin(), APInt(16, (uint64_t)INT16_MIN));
136136 EXPECT_EQ(One.getSignedMin(), APInt(16, 0xa));
137137 EXPECT_EQ(Some.getSignedMin(), APInt(16, 0xa));
138 EXPECT_EQ(Wrap.getSignedMin(), APInt(16, INT16_MIN));
138 EXPECT_EQ(Wrap.getSignedMin(), APInt(16, (uint64_t)INT16_MIN));
139139
140140 // Found by Klee
141141 EXPECT_EQ(ConstantRange(APInt(4, 7), APInt(4, 0)).getSignedMax(),
177177 ConstantRange SOne = One.signExtend(20);
178178 ConstantRange SSome = Some.signExtend(20);
179179 ConstantRange SWrap = Wrap.signExtend(20);
180 EXPECT_EQ(SFull, ConstantRange(APInt(20, INT16_MIN, true),
180 EXPECT_EQ(SFull, ConstantRange(APInt(20, (uint64_t)INT16_MIN, true),
181181 APInt(20, INT16_MAX + 1, true)));
182182 EXPECT_TRUE(SEmpty.isEmptySet());
183183 EXPECT_EQ(SOne, ConstantRange(APInt(One.getLower()).sext(20),
320320 EXPECT_EQ(Empty.smax(One), Empty);
321321 EXPECT_EQ(Some.smax(Some), Some);
322322 EXPECT_EQ(Some.smax(Wrap), ConstantRange(APInt(16, 0xa),
323 APInt(16, INT16_MIN)));
323 APInt(16, (uint64_t)INT16_MIN)));
324324 EXPECT_EQ(Some.smax(One), Some);
325325 EXPECT_EQ(Wrap.smax(One), ConstantRange(APInt(16, 0xa),
326 APInt(16, INT16_MIN)));
326 APInt(16, (uint64_t)INT16_MIN)));
327327 EXPECT_EQ(One.smax(One), One);
328328 }
329329