[llvm] a345736 - [Orc] Fix `-Wsign-compare` warnings in unittest
Min Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 14:41:20 PDT 2024
Author: Min Hsu
Date: 2024-05-09T14:40:19-07:00
New Revision: a3457369cd12b093185a5bda3443e08a4390f3ed
URL: https://github.com/llvm/llvm-project/commit/a3457369cd12b093185a5bda3443e08a4390f3ed
DIFF: https://github.com/llvm/llvm-project/commit/a3457369cd12b093185a5bda3443e08a4390f3ed.diff
LOG: [Orc] Fix `-Wsign-compare` warnings in unittest
Multiple compares against `LookupsCompleted`, which is effectively an
unsigned long, with constant signed integer were throwing -Wsign-compare
warnings.
This is effectively NFC.
Added:
Modified:
llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
index a6fa69f97fcbe..53a74c833eb31 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
@@ -1170,7 +1170,7 @@ TEST_F(CoreAPIsStandardTest, ErrorFromAutoSuspendedAsynchronousGeneratorTest) {
},
NoDependenciesToRegister);
- EXPECT_EQ(LookupsCompleted, 0);
+ EXPECT_EQ(LookupsCompleted, 0U);
// Suspend the first lookup.
auto LS1 = std::move(G.takeLookup().LS);
@@ -1185,7 +1185,7 @@ TEST_F(CoreAPIsStandardTest, ErrorFromAutoSuspendedAsynchronousGeneratorTest) {
},
NoDependenciesToRegister);
- EXPECT_EQ(LookupsCompleted, 0);
+ EXPECT_EQ(LookupsCompleted, 0U);
// Unsuspend the first lookup.
LS1.continueLookup(make_error<StringError>("boom", inconvertibleErrorCode()));
@@ -1194,7 +1194,7 @@ TEST_F(CoreAPIsStandardTest, ErrorFromAutoSuspendedAsynchronousGeneratorTest) {
G.takeLookup().LS.continueLookup(
make_error<StringError>("boom", inconvertibleErrorCode()));
- EXPECT_EQ(LookupsCompleted, 2);
+ EXPECT_EQ(LookupsCompleted, 2U);
}
TEST_F(CoreAPIsStandardTest, BlockedGeneratorAutoSuspensionTest) {
More information about the llvm-commits
mailing list