Skip to content

Commit 55459f6

Browse files
committed
[MLIR] PresburgerSet::isIntegerEmpty: address clang-tidy warning
1 parent 02022cc commit 55459f6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

mlir/lib/Analysis/Presburger/PresburgerSet.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,9 @@ bool PresburgerSet::isEqual(const PresburgerSet &set) const {
369369
/// false otherwise.
370370
bool PresburgerSet::isIntegerEmpty() const {
371371
// The set is empty iff all of the disjuncts are empty.
372-
for (const IntegerPolyhedron &poly : integerPolyhedrons) {
373-
if (!poly.isIntegerEmpty())
374-
return false;
375-
}
376-
return true;
372+
return std::all_of(
373+
integerPolyhedrons.begin(), integerPolyhedrons.end(),
374+
[](const IntegerPolyhedron &poly) { return poly.isIntegerEmpty(); });
377375
}
378376

379377
bool PresburgerSet::findIntegerSample(SmallVectorImpl<int64_t> &sample) {

0 commit comments

Comments
 (0)