File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2023,10 +2023,13 @@ void TreePatternNode::InlinePatternFragments(
2023
2023
if (ChildAlternatives[i].empty ())
2024
2024
return ;
2025
2025
2026
- for (const auto &NewChild : ChildAlternatives[i])
2027
- assert ((Child->getPredicateCalls ().empty () ||
2028
- NewChild->getPredicateCalls () == Child->getPredicateCalls ()) &&
2029
- " Non-empty child predicate clobbered!" );
2026
+ assert (Child->getPredicateCalls ().empty () ||
2027
+ llvm::all_of (ChildAlternatives[i],
2028
+ [&](const TreePatternNodePtr &NewChild) {
2029
+ return NewChild->getPredicateCalls () ==
2030
+ Child->getPredicateCalls ();
2031
+ }) &&
2032
+ " Non-empty child predicate clobbered!" );
2030
2033
}
2031
2034
2032
2035
// The end result is an all-pairs construction of the resultant pattern.
You can’t perform that action at this time.
0 commit comments