[llvm] 657b325 - [TableGen] Fix -Wparentheses
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 16 13:37:58 PDT 2021
Author: Fangrui Song
Date: 2021-04-16T13:37:52-07:00
New Revision: 657b325416682e37c43756d55a31dc729a062387
URL: https://github.com/llvm/llvm-project/commit/657b325416682e37c43756d55a31dc729a062387
DIFF: https://github.com/llvm/llvm-project/commit/657b325416682e37c43756d55a31dc729a062387.diff
LOG: [TableGen] Fix -Wparentheses
Added:
Modified:
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
Removed:
################################################################################
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 30eadbd84bd8..dff346477a05 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -2023,13 +2023,13 @@ void TreePatternNode::InlinePatternFragments(
if (ChildAlternatives[i].empty())
return;
- assert(Child->getPredicateCalls().empty() ||
- llvm::all_of(ChildAlternatives[i],
- [&](const TreePatternNodePtr &NewChild) {
- return NewChild->getPredicateCalls() ==
- Child->getPredicateCalls();
- }) &&
- "Non-empty child predicate clobbered!");
+ assert((Child->getPredicateCalls().empty() ||
+ llvm::all_of(ChildAlternatives[i],
+ [&](const TreePatternNodePtr &NewChild) {
+ return NewChild->getPredicateCalls() ==
+ Child->getPredicateCalls();
+ })) &&
+ "Non-empty child predicate clobbered!");
}
// The end result is an all-pairs construction of the resultant pattern.
More information about the llvm-commits
mailing list