Apply clang-tidy fixes for readability-simplify-boolean-expr in Shape.cpp (NFC)
authorMehdi Amini <joker.eph@gmail.com>
Sun, 12 Jun 2022 17:51:08 +0000 (17:51 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Tue, 28 Jun 2022 18:08:58 +0000 (18:08 +0000)
mlir/lib/Dialect/Shape/IR/Shape.cpp

index b3f6c4c..b448291 100644 (file)
@@ -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();