[Mlir-commits] [mlir] cf3f477 - Apply clang-tidy fixes for readability-simplify-boolean-expr in Utils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Tue Jun 28 04:22:24 PDT 2022
Author: Mehdi Amini
Date: 2022-06-28T11:21:37Z
New Revision: cf3f477d30476754162c4b4a0f6f280f23d11ee2
URL: https://github.com/llvm/llvm-project/commit/cf3f477d30476754162c4b4a0f6f280f23d11ee2
DIFF: https://github.com/llvm/llvm-project/commit/cf3f477d30476754162c4b4a0f6f280f23d11ee2.diff
LOG: Apply clang-tidy fixes for readability-simplify-boolean-expr in Utils.cpp (NFC)
Added:
Modified:
mlir/lib/Analysis/Presburger/Utils.cpp
Removed:
################################################################################
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.
More information about the Mlir-commits
mailing list