From 937708cea9de4bc65c8d3297fcf0396686729912 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 13 Oct 2009 09:23:11 +0000 Subject: [PATCH] Pacify the compiler (signed with unsigned comparison) by making these constants unsigned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83962 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ADT/APIntTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp index 7b03d0f00c8..0b13aa402ea 100644 --- a/unittests/ADT/APIntTest.cpp +++ b/unittests/ADT/APIntTest.cpp @@ -316,14 +316,14 @@ TEST(APIntTest, StringBitsNeeded16) { } TEST(APIntTest, Log2) { - EXPECT_EQ(APInt(15, 7).logBase2(), 2); - EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3); + EXPECT_EQ(APInt(15, 7).logBase2(), 2U); + EXPECT_EQ(APInt(15, 7).ceilLogBase2(), 3U); EXPECT_EQ(APInt(15, 7).exactLogBase2(), -1); - EXPECT_EQ(APInt(15, 8).logBase2(), 3); - EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3); + EXPECT_EQ(APInt(15, 8).logBase2(), 3U); + EXPECT_EQ(APInt(15, 8).ceilLogBase2(), 3U); EXPECT_EQ(APInt(15, 8).exactLogBase2(), 3); - EXPECT_EQ(APInt(15, 9).logBase2(), 3); - EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4); + EXPECT_EQ(APInt(15, 9).logBase2(), 3U); + EXPECT_EQ(APInt(15, 9).ceilLogBase2(), 4U); EXPECT_EQ(APInt(15, 9).exactLogBase2(), -1); }