Revert clang-tidy fixes for readability-simplify-boolean-expr and add NOLINT

The original code is more readable because the goal is to check if the given
value does *not* lie in the range. It is harder to understand this by
reading the rewritten code.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D128753
This commit is contained in:
Arjun P 2022-06-29 12:21:48 +01:00
parent 66a16b2848
commit 7236e5de54
1 changed files with 1 additions and 1 deletions

View File

@ -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 (!(0 <= c && c <= divisor - 1)) // NOLINT
return failure();
// The inequality pair can be used to extract the division.