[MLIR] PresburgerSet::isIntegerEmpty: address clang-tidy warning

This commit is contained in:
Arjun P 2022-02-02 17:56:30 +05:30
parent 02022ccccc
commit 55459f67b4
1 changed files with 3 additions and 5 deletions

View File

@ -369,11 +369,9 @@ bool PresburgerSet::isEqual(const PresburgerSet &set) const {
/// false otherwise.
bool PresburgerSet::isIntegerEmpty() const {
// The set is empty iff all of the disjuncts are empty.
for (const IntegerPolyhedron &poly : integerPolyhedrons) {
if (!poly.isIntegerEmpty())
return false;
}
return true;
return std::all_of(
integerPolyhedrons.begin(), integerPolyhedrons.end(),
[](const IntegerPolyhedron &poly) { return poly.isIntegerEmpty(); });
}
bool PresburgerSet::findIntegerSample(SmallVectorImpl<int64_t> &sample) {