[llvm] a682f52 - [IR][test] Fix warning in MMRA tests
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 07:33:53 PDT 2024
Author: pvanhout
Date: 2024-04-24T16:33:44+02:00
New Revision: a682f528d4d2523c044ab08cf3a8ecfd8e42760d
URL: https://github.com/llvm/llvm-project/commit/a682f528d4d2523c044ab08cf3a8ecfd8e42760d
DIFF: https://github.com/llvm/llvm-project/commit/a682f528d4d2523c044ab08cf3a8ecfd8e42760d.diff
LOG: [IR][test] Fix warning in MMRA tests
Added:
Modified:
llvm/unittests/IR/MemoryModelRelaxationAnnotationsTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/IR/MemoryModelRelaxationAnnotationsTest.cpp b/llvm/unittests/IR/MemoryModelRelaxationAnnotationsTest.cpp
index 623236436e7047..8feeb8af65a76e 100644
--- a/llvm/unittests/IR/MemoryModelRelaxationAnnotationsTest.cpp
+++ b/llvm/unittests/IR/MemoryModelRelaxationAnnotationsTest.cpp
@@ -58,12 +58,12 @@ TEST(MMRATest, GetMD) {
EXPECT_EQ(MMRAMetadata::getMD(Ctx, {}), nullptr);
MDTuple *SingleMD = MMRAMetadata::getMD(Ctx, {{"foo", "bar"}});
- EXPECT_EQ(SingleMD->getNumOperands(), 2);
+ EXPECT_EQ(SingleMD->getNumOperands(), 2u);
EXPECT_EQ(cast<MDString>(SingleMD->getOperand(0))->getString(), "foo");
EXPECT_EQ(cast<MDString>(SingleMD->getOperand(1))->getString(), "bar");
MDTuple *MultiMD = MMRAMetadata::getMD(Ctx, {{"foo", "bar"}, {"bux", "qux"}});
- EXPECT_EQ(MultiMD->getNumOperands(), 2);
+ EXPECT_EQ(MultiMD->getNumOperands(), 2u);
MDTuple *FooBar = cast<MDTuple>(MultiMD->getOperand(0));
EXPECT_EQ(cast<MDString>(FooBar->getOperand(0))->getString(), "foo");
More information about the llvm-commits
mailing list