Skip to content

Commit

Permalink
Apply clang-tidy fixes for readability-simplify-boolean-expr in Shape…
Browse files Browse the repository at this point in the history
….cpp (NFC)
  • Loading branch information
joker-eph committed Jun 28, 2022
1 parent cd417c6 commit 35d7ebb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/Shape/IR/Shape.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 35d7ebb

Please sign in to comment.