projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f0194b
)
[IR][ShuffleVector] Fix Wdangling-else warning in InstructionsTest
author
Luke Benes
<lukebenes@hotmail.com>
Sat, 6 Nov 2021 21:06:55 +0000
(
00:06
+0300)
committer
Roman Lebedev
<lebedev.ri@gmail.com>
Sat, 6 Nov 2021 21:07:01 +0000
(
00:07
+0300)
Fix a dangling else that gcc-11 warned about. The EXPECT_EQ macro
expands to an if-else, so the whole construction contains a hidden
dangling else.
Differential Revision: https://reviews.llvm.org/D113346
llvm/unittests/IR/InstructionsTest.cpp
patch
|
blob
|
history
diff --git
a/llvm/unittests/IR/InstructionsTest.cpp
b/llvm/unittests/IR/InstructionsTest.cpp
index
a4a9671
..
5b977ef
100644
(file)
--- a/
llvm/unittests/IR/InstructionsTest.cpp
+++ b/
llvm/unittests/IR/InstructionsTest.cpp
@@
-1204,8
+1204,9
@@
TEST(InstructionsTest, ShuffleMaskIsReplicationMask_Exhaustive_Correctness) {
int Elt = std::get<0>(I);
int ActualElt = std::get<0>(I);
- if (Elt != -1)
+ if (Elt != -1)
{
EXPECT_EQ(Elt, ActualElt);
+ }
}
return /*Abort=*/false;