Apply clang-tidy fixes for readability-simplify-boolean-expr in Shape.cpp (NFC)

This commit is contained in:
Mehdi Amini 2022-06-12 17:51:08 +00:00
parent cd417c6a46
commit 35d7ebb1b7
1 changed files with 1 additions and 1 deletions

View 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();