[llvm] 3e0d21d - Fix signed mismatch warnings in MetadataTests.cpp

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 11:36:47 PST 2019


Author: David Blaikie
Date: 2019-12-03T11:36:36-08:00
New Revision: 3e0d21d84bef95edbf00e0b3e6d5a584300f1349

URL: https://github.com/llvm/llvm-project/commit/3e0d21d84bef95edbf00e0b3e6d5a584300f1349
DIFF: https://github.com/llvm/llvm-project/commit/3e0d21d84bef95edbf00e0b3e6d5a584300f1349.diff

LOG: Fix signed mismatch warnings in MetadataTests.cpp

Added: 
    

Modified: 
    llvm/unittests/IR/MetadataTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index b2be82565cfc..424aaa7bf0c9 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -2924,15 +2924,15 @@ TEST_F(DebugVariableTest, DenseMap) {
   DebugVariableMap.insert({DebugVariableB, 6});
   DebugVariableMap.insert({DebugVariableFragB, 12});
 
-  EXPECT_EQ(DebugVariableMap.count(DebugVariableA), 1);
-  EXPECT_EQ(DebugVariableMap.count(DebugVariableInlineA), 1);
-  EXPECT_EQ(DebugVariableMap.count(DebugVariableB), 1);
-  EXPECT_EQ(DebugVariableMap.count(DebugVariableFragB), 1);
-
-  EXPECT_EQ(DebugVariableMap.find(DebugVariableA)->second, 2);
-  EXPECT_EQ(DebugVariableMap.find(DebugVariableInlineA)->second, 3);
-  EXPECT_EQ(DebugVariableMap.find(DebugVariableB)->second, 6);
-  EXPECT_EQ(DebugVariableMap.find(DebugVariableFragB)->second, 12);
+  EXPECT_EQ(DebugVariableMap.count(DebugVariableA), 1u);
+  EXPECT_EQ(DebugVariableMap.count(DebugVariableInlineA), 1u);
+  EXPECT_EQ(DebugVariableMap.count(DebugVariableB), 1u);
+  EXPECT_EQ(DebugVariableMap.count(DebugVariableFragB), 1u);
+
+  EXPECT_EQ(DebugVariableMap.find(DebugVariableA)->second, 2u);
+  EXPECT_EQ(DebugVariableMap.find(DebugVariableInlineA)->second, 3u);
+  EXPECT_EQ(DebugVariableMap.find(DebugVariableB)->second, 6u);
+  EXPECT_EQ(DebugVariableMap.find(DebugVariableFragB)->second, 12u);
 }
 
 } // end namespace


        


More information about the llvm-commits mailing list