Skip to content

Commit

Permalink
[Orc] Fix -Wsign-compare warnings in unittest
Browse files Browse the repository at this point in the history
Multiple compares against `LookupsCompleted`, which is effectively an
unsigned long, with constant signed integer were throwing -Wsign-compare
warnings.

This is effectively NFC.
  • Loading branch information
mshockwave committed May 9, 2024
1 parent dfff57e commit a345736
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()));
Expand All @@ -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) {
Expand Down

0 comments on commit a345736

Please sign in to comment.