From cf3f477d30476754162c4b4a0f6f280f23d11ee2 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sun, 12 Jun 2022 16:42:42 +0000 Subject: [PATCH] Apply clang-tidy fixes for readability-simplify-boolean-expr in Utils.cpp (NFC) --- mlir/lib/Analysis/Presburger/Utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/lib/Analysis/Presburger/Utils.cpp b/mlir/lib/Analysis/Presburger/Utils.cpp index df52bb9cb34a6..c6ed7b254621e 100644 --- a/mlir/lib/Analysis/Presburger/Utils.cpp +++ b/mlir/lib/Analysis/Presburger/Utils.cpp @@ -120,7 +120,7 @@ static LogicalResult getDivRepr(const IntegerRelation &cst, unsigned pos, // Check if `c` satisfies the condition `0 <= c <= divisor - 1`. This also // implictly checks that `divisor` is positive. - if (!(c >= 0 && c <= divisor - 1)) + if (c < 0 || c > divisor - 1) return failure(); // The inequality pair can be used to extract the division.