Skip to content
Commit c3acd2e9 authored by Alexander Kornienko's avatar Alexander Kornienko
Browse files

[clang-tidy] Catch trivially true statements like a != 1 || a != 3

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 != RUNNING || state != STARTING)
...

Patch by Blaise Watson!

Differential revision: https://reviews.llvm.org/D29858

llvm-svn: 298607
parent 11ad3391
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment