From 07bcf756ae4b13c965e19e2980be1318a1277b24 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 24 Feb 2017 11:31:00 +0000 Subject: [PATCH] Fix signed/unsigned comparison warnings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296109 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/APIntTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp index 3d0f6f57dc0..39a88cdca90 100644 --- a/unittests/ADT/APIntTest.cpp +++ b/unittests/ADT/APIntTest.cpp @@ -70,8 +70,8 @@ TEST(APIntTest, i61_Count) { EXPECT_EQ(16u, i61.getActiveBits()); EXPECT_EQ(15u, i61.countTrailingZeros()); EXPECT_EQ(1u, i61.countPopulation()); - EXPECT_EQ((1 << 15), i61.getSExtValue()); - EXPECT_EQ((1 << 15), i61.getZExtValue()); + EXPECT_EQ(static_cast(1 << 15), i61.getSExtValue()); + EXPECT_EQ(static_cast(1 << 15), i61.getZExtValue()); i61.setBits(8, 19); EXPECT_EQ(42u, i61.countLeadingZeros()); @@ -79,8 +79,8 @@ TEST(APIntTest, i61_Count) { EXPECT_EQ(19u, i61.getActiveBits()); EXPECT_EQ(8u, i61.countTrailingZeros()); EXPECT_EQ(11u, i61.countPopulation()); - EXPECT_EQ((1 << 19) - (1 << 8), i61.getSExtValue()); - EXPECT_EQ((1 << 19) - (1 << 8), i61.getZExtValue()); + EXPECT_EQ(static_cast((1 << 19) - (1 << 8)), i61.getSExtValue()); + EXPECT_EQ(static_cast((1 << 19) - (1 << 8)), i61.getZExtValue()); } TEST(APIntTest, i65_Count) { -- 2.40.0