diff --git a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp --- a/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp +++ b/llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp @@ -56,17 +56,17 @@ false, false); // Check that iteration of blocks within a section behaves as expected. - EXPECT_EQ(std::distance(Sec1.blocks().begin(), Sec1.blocks().end()), 2U); + EXPECT_EQ(std::distance(Sec1.blocks().begin(), Sec1.blocks().end()), 2); EXPECT_TRUE(llvm::count(Sec1.blocks(), &B1)); EXPECT_TRUE(llvm::count(Sec1.blocks(), &B2)); // Check that iteration of symbols within a section behaves as expected. - EXPECT_EQ(std::distance(Sec1.symbols().begin(), Sec1.symbols().end()), 2U); + EXPECT_EQ(std::distance(Sec1.symbols().begin(), Sec1.symbols().end()), 2); EXPECT_TRUE(llvm::count(Sec1.symbols(), &S1)); EXPECT_TRUE(llvm::count(Sec1.symbols(), &S2)); // Check that iteration of blocks across sections behaves as expected. - EXPECT_EQ(std::distance(G.blocks().begin(), G.blocks().end()), 4U); + EXPECT_EQ(std::distance(G.blocks().begin(), G.blocks().end()), 4); EXPECT_TRUE(llvm::count(G.blocks(), &B1)); EXPECT_TRUE(llvm::count(G.blocks(), &B2)); EXPECT_TRUE(llvm::count(G.blocks(), &B3)); @@ -75,8 +75,7 @@ // Check that iteration of defined symbols across sections behaves as // expected. EXPECT_EQ( - std::distance(G.defined_symbols().begin(), G.defined_symbols().end()), - 4U); + std::distance(G.defined_symbols().begin(), G.defined_symbols().end()), 4); EXPECT_TRUE(llvm::count(G.defined_symbols(), &S1)); EXPECT_TRUE(llvm::count(G.defined_symbols(), &S2)); EXPECT_TRUE(llvm::count(G.defined_symbols(), &S3)); diff --git a/llvm/unittests/Object/MinidumpTest.cpp b/llvm/unittests/Object/MinidumpTest.cpp --- a/llvm/unittests/Object/MinidumpTest.cpp +++ b/llvm/unittests/Object/MinidumpTest.cpp @@ -589,7 +589,7 @@ const MinidumpFile &File = **ExpectedFile; auto ExpectedInfo = File.getMemoryInfoList(); ASSERT_THAT_EXPECTED(ExpectedInfo, Succeeded()); - ASSERT_EQ(1u, std::distance(ExpectedInfo->begin(), ExpectedInfo->end())); + ASSERT_EQ(1, std::distance(ExpectedInfo->begin(), ExpectedInfo->end())); const MemoryInfo &Info = *ExpectedInfo.get().begin(); EXPECT_EQ(0x0706050403020100u, Info.BaseAddress); EXPECT_EQ(0x0504030201000908u, Info.AllocationBase);