[Mlir-commits] [mlir] 27839e1 - [mlir] Fix warnings
Kazu Hirata
llvmlistbot at llvm.org
Thu Dec 22 11:10:53 PST 2022
Author: Kazu Hirata
Date: 2022-12-22T11:10:47-08:00
New Revision: 27839e1e171a8e60f9c9f34bc4e80951670f915b
URL: https://github.com/llvm/llvm-project/commit/27839e1e171a8e60f9c9f34bc4e80951670f915b
DIFF: https://github.com/llvm/llvm-project/commit/27839e1e171a8e60f9c9f34bc4e80951670f915b.diff
LOG: [mlir] Fix warnings
This patch fixes:
third-party/unittest/googletest/include/gtest/gtest.h:1526:11:
error: comparison of integers of different signs: 'const unsigned
long' and 'const int' [-Werror,-Wsign-compare]
Added:
Modified:
mlir/unittests/IR/PatternMatchTest.cpp
Removed:
################################################################################
diff --git a/mlir/unittests/IR/PatternMatchTest.cpp b/mlir/unittests/IR/PatternMatchTest.cpp
index 3a58d5c1634d9..30b72618e45f0 100644
--- a/mlir/unittests/IR/PatternMatchTest.cpp
+++ b/mlir/unittests/IR/PatternMatchTest.cpp
@@ -39,10 +39,10 @@ TEST(AnOpRewritePatternTest, PatternFuncAttributes) {
patterns.add(anOpRewritePatternFunc, /*benefit=*/3,
/*generatedNames=*/{test::OpB::getOperationName()});
- ASSERT_EQ(patterns.getNativePatterns().size(), 1);
+ ASSERT_EQ(patterns.getNativePatterns().size(), 1U);
auto &pattern = patterns.getNativePatterns().front();
ASSERT_EQ(pattern->getBenefit(), 3);
- ASSERT_EQ(pattern->getGeneratedOps().size(), 1);
+ ASSERT_EQ(pattern->getGeneratedOps().size(), 1U);
ASSERT_EQ(pattern->getGeneratedOps().front().getStringRef(),
test::OpB::getOperationName());
}
More information about the Mlir-commits
mailing list