[Mlir-commits] [mlir] 35d7ebb - Apply clang-tidy fixes for readability-simplify-boolean-expr in Shape.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Tue Jun 28 11:09:16 PDT 2022
Author: Mehdi Amini
Date: 2022-06-28T18:08:58Z
New Revision: 35d7ebb1b7a0e4df9c01854fe28d7c9890f81d77
URL: https://github.com/llvm/llvm-project/commit/35d7ebb1b7a0e4df9c01854fe28d7c9890f81d77
DIFF: https://github.com/llvm/llvm-project/commit/35d7ebb1b7a0e4df9c01854fe28d7c9890f81d77.diff
LOG: Apply clang-tidy fixes for readability-simplify-boolean-expr in Shape.cpp (NFC)
Added:
Modified:
mlir/lib/Dialect/Shape/IR/Shape.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Shape/IR/Shape.cpp b/mlir/lib/Dialect/Shape/IR/Shape.cpp
index b3f6c4cc2cea7..b4482914b2439 100644
--- a/mlir/lib/Dialect/Shape/IR/Shape.cpp
+++ b/mlir/lib/Dialect/Shape/IR/Shape.cpp
@@ -1717,7 +1717,7 @@ LogicalResult SplitAtOp::fold(ArrayRef<Attribute> operands,
// Verify that the split point is in the correct range.
// TODO: Constant fold to an "error".
int64_t rank = shape.size();
- if (!(-rank <= splitPoint && splitPoint <= rank))
+ if (-rank > splitPoint || splitPoint > rank)
return failure();
if (splitPoint < 0)
splitPoint += shape.size();
More information about the Mlir-commits
mailing list