[llvm] 4127a69 - [Support] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 20:27:45 PDT 2024


Author: Kazu Hirata
Date: 2024-04-22T20:27:38-07:00
New Revision: 4127a69d6c9106cb96a5da30daec7df80fb812d1

URL: https://github.com/llvm/llvm-project/commit/4127a69d6c9106cb96a5da30daec7df80fb812d1
DIFF: https://github.com/llvm/llvm-project/commit/4127a69d6c9106cb96a5da30daec7df80fb812d1.diff

LOG: [Support] Fix a warning

This patch fixes:

  third-party/unittest/googletest/include/gtest/gtest.h:1379:11:
  error: comparison of integers of different signs: 'const int' and
  'const unsigned long' [-Werror,-Wsign-compare]

Added: 
    

Modified: 
    llvm/unittests/Support/MathExtrasTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Support/MathExtrasTest.cpp b/llvm/unittests/Support/MathExtrasTest.cpp
index d09f987b9d0f15..67239a24c47add 100644
--- a/llvm/unittests/Support/MathExtrasTest.cpp
+++ b/llvm/unittests/Support/MathExtrasTest.cpp
@@ -77,7 +77,7 @@ TEST(MathExtras, maxUIntN) {
   EXPECT_EQ(0xffffffffffffffffULL, maxUIntN(64));
   EXPECT_EQ(1ULL, maxUIntN(1));
   EXPECT_EQ(0x0fULL, maxUIntN(4));
-  EXPECT_EQ(0, maxUIntN(0));
+  EXPECT_EQ(0ULL, maxUIntN(0));
 }
 
 TEST(MathExtras, reverseBits) {


        


More information about the llvm-commits mailing list