This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by arjunp on Jun 28 2022, 12:40 PM.

Details

Summary

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.

Diff Detail

Event Timeline

arjunp created this revision.Jun 28 2022, 12:40 PM
arjunp requested review of this revision.Jun 28 2022, 12:40 PM
mehdi_amini added inline comments.Jun 28 2022, 12:49 PM
mlir/lib/Analysis/Presburger/Utils.cpp
123

You haven't changed the expression here?

mehdi_amini accepted this revision.Jun 28 2022, 12:51 PM

LG after you actually revert the line :)

mlir/lib/Analysis/Presburger/Utils.cpp
123

That is, you intended to restore if (!(c >= 0 && c <= divisor - 1)) I think

This revision is now accepted and ready to land.Jun 28 2022, 12:51 PM
arjunp updated this revision to Diff 440934.Jun 29 2022, 4:21 AM

Actually revert the change...

arjunp added inline comments.Jun 29 2022, 4:23 AM
mlir/lib/Analysis/Presburger/Utils.cpp
123

Yes haha, thanks :)

This revision was landed with ongoing or failed builds.Jun 29 2022, 4:23 AM
This revision was automatically updated to reflect the committed changes.