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. /// A point is contained in the union iff any of the parts contain the point.
bool PresburgerSet::containsPoint(ArrayRef<int64_t> point) const { bool PresburgerSet::containsPoint(ArrayRef<int64_t> point) const {
for (const FlatAffineConstraints &fac : flatAffineConstraints) { return llvm::any_of(flatAffineConstraints,
if (fac.containsPoint(point)) [&](const FlatAffineConstraints &fac) {
return true; return (fac.containsPoint(point));
} });
return false;
} }
PresburgerSet PresburgerSet::getUniverse(unsigned nDim, unsigned nSym) { PresburgerSet PresburgerSet::getUniverse(unsigned nDim, unsigned nSym) {