[llvm] 303e020 - [FrontEnd] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 10:25:51 PDT 2023
Author: Kazu Hirata
Date: 2023-10-09T10:25:43-07:00
New Revision: 303e020126268a691c9d51563c2a95cf30dcf6d1
URL: https://github.com/llvm/llvm-project/commit/303e020126268a691c9d51563c2a95cf30dcf6d1
DIFF: https://github.com/llvm/llvm-project/commit/303e020126268a691c9d51563c2a95cf30dcf6d1.diff
LOG: [FrontEnd] Fix a warning
This patch fixes:
third-party/unittest/googletest/include/gtest/gtest.h:1379:11:
error: comparison of integers of different signs: 'const unsigned
int' and 'const int' [-Werror,-Wsign-compare]
Added:
Modified:
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
index c56b11d3c5faeab..c60aca259d1859f 100644
--- a/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+++ b/llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
@@ -5547,7 +5547,7 @@ TEST_F(OpenMPIRBuilderTest, CreateTask) {
// Verify that the data argument is used only once, and that too in the load
// instruction that is then used for accessing shared data.
Value *DataPtr = OutlinedFn->getArg(1);
- EXPECT_EQ(DataPtr->getNumUses(), 1);
+ EXPECT_EQ(DataPtr->getNumUses(), 1U);
EXPECT_TRUE(isa<LoadInst>(DataPtr->uses().begin()->getUser()));
Value *Data = DataPtr->uses().begin()->getUser();
EXPECT_TRUE(all_of(Data->uses(), [](Use &U) {
@@ -5604,7 +5604,7 @@ TEST_F(OpenMPIRBuilderTest, CreateTaskNoArgs) {
->user_back());
Function *OutlinedFn = dyn_cast<Function>(TaskAllocCall->getArgOperand(5));
ASSERT_NE(OutlinedFn, nullptr);
- ASSERT_EQ(OutlinedFn->arg_size(), 1);
+ ASSERT_EQ(OutlinedFn->arg_size(), 1U);
}
TEST_F(OpenMPIRBuilderTest, CreateTaskUntied) {
More information about the llvm-commits
mailing list