watsond added a comment.
Following up. Was this checked in? Do I need to do anything further?
https://reviews.llvm.org/D29858
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
watsond created this revision.
...ENDING)
...
[clang-tidy] Catch trivially true statements like a != 1 || a != 3
https://reviews.llvm.org/D29857
Files:
clang-tidy/misc/RedundantExpressionCheck.cpp
test/clang-tidy/misc-redundant-expression.cpp
Index: test/clang-tidy/misc-redundant-express
watsond updated this revision to Diff 88072.
watsond added a comment.
Updating D29857: Catch trivially true statements of the form a != 1 || a != 3.
Statements like
==
these are likely errors. They are
watsond abandoned this revision.
watsond added a comment.
Apologies all. I messed up the formatting. Resubmitting in a second.
https://reviews.llvm.org/D29857
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mail
watsond created this revision.
Herald added a subscriber: JDevlieghere.
Catch trivially true statements of the form a != 1 || a != 3. Statements like
these are likely errors. They are particularly easy to miss when handling enums:
enum State {
RUNNING,
STOPPED,
STARTING,
ENDING
}
...
if (state !
watsond marked 2 inline comments as done.
watsond added a comment.
In https://reviews.llvm.org/D29858#675055, @etienneb wrote:
> Could you add some tests with enums (like the one in your description)?
> This is missing and it's a nice to have.
Added
Comment at: clang-tidy/m
watsond updated this revision to Diff 90087.
watsond marked an inline comment as done.
watsond added a comment.
Fixed logic error, added enum test case
https://reviews.llvm.org/D29858
Files:
clang-tidy/misc/RedundantExpressionCheck.cpp
test/clang-tidy/misc-redundant-expression.cpp
Index:
watsond added a comment.
In https://reviews.llvm.org/D29858#690700, @alexfh wrote:
> Do you need someone to commit the patch for you?
I think so. This is my only LLVM patch, so I doubt I have permissions. Thanks
in advance!
https://reviews.llvm.org/D29858
_