Replace raw-loop with llvm::any_of() in PresburgerSet.cpp (NFC)

Reported by clang-tidy.
This commit is contained in:
Mehdi Amini 2022-01-02 22:39:57 +00:00
parent 4f415216ca
commit 56f5e4abb8
1 changed files with 4 additions and 5 deletions

View File

@ -85,11 +85,10 @@ PresburgerSet PresburgerSet::unionSet(const PresburgerSet &set) const {
/// A point is contained in the union iff any of the parts contain the point.
bool PresburgerSet::containsPoint(ArrayRef<int64_t> point) const {
for (const FlatAffineConstraints &fac : flatAffineConstraints) {
if (fac.containsPoint(point))
return true;
}
return false;
return llvm::any_of(flatAffineConstraints,
[&](const FlatAffineConstraints &fac) {
return (fac.containsPoint(point));
});
}
PresburgerSet PresburgerSet::getUniverse(unsigned nDim, unsigned nSym) {