[clang] 6ef08c3 - Fix the -Wsign-compare warning.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 07:53:24 PDT 2020


Author: Haojian Wu
Date: 2020-06-10T16:51:54+02:00
New Revision: 6ef08c3a700761eaedc49edadc6d1dbadbc85670

URL: https://github.com/llvm/llvm-project/commit/6ef08c3a700761eaedc49edadc6d1dbadbc85670
DIFF: https://github.com/llvm/llvm-project/commit/6ef08c3a700761eaedc49edadc6d1dbadbc85670.diff

LOG: Fix the -Wsign-compare warning.

Added: 
    

Modified: 
    clang/unittests/CrossTU/CrossTranslationUnitTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp b/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
index b8bf7363af7f..36a697d54c8a 100644
--- a/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
+++ b/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
@@ -226,7 +226,7 @@ TEST(CrossTranslationUnit, SingleInvocationCanBeParsed) {
   llvm::Expected<InvocationListTy> Result = parseInvocationList(Input);
   EXPECT_TRUE(static_cast<bool>(Result));
 
-  EXPECT_EQ(Result->size(), 1);
+  EXPECT_EQ(Result->size(), 1u);
 
   auto It = Result->find("/tmp/main.cpp");
   EXPECT_TRUE(It != Result->end());
@@ -250,7 +250,7 @@ TEST(CrossTranslationUnit, MultipleInvocationsCanBeParsed) {
   llvm::Expected<InvocationListTy> Result = parseInvocationList(Input);
   EXPECT_TRUE(static_cast<bool>(Result));
 
-  EXPECT_EQ(Result->size(), 2);
+  EXPECT_EQ(Result->size(), 2u);
 
   auto It = Result->find("/tmp/main.cpp");
   EXPECT_TRUE(It != Result->end());


        


More information about the cfe-commits mailing list