[PATCH] D19451: [clang-tidy] New checker for redundant expressions.
Etienne Bergeron via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 23 09:30:13 PDT 2016
etienneb added a comment.
In http://reviews.llvm.org/D19451#410014, @Eugene.Zelenko wrote:
> Please mention this check in docs/ReleaseNotes.rst (in alphabetical order).
>
> Will check catch more complicated cases, like
>
> if ((Point1.x < Point2.x) && (Point1.x < Point2.x)) ?
It is catching these cases.
> Will be good idea to add such cases in test.
I can add it as a test, no prob. I'm never against more tests.
I have more cases implemented, but I prefer landing this piece by piece to let people review it and report false-positive.
I'm able to recognize stuff like:
x == 10 && x <= 12 (x <= 12 is redundant), and many other cases with bitwise operations.
I need time to deal correctly with False positives. And, I'm not sure it will be part of the same matcher. Will see..
http://reviews.llvm.org/D19451
More information about the cfe-commits
mailing list