| commit | c3acd2e9c048d5e63436cf775760beab21579801 | [log] [tgz] |
|---|---|---|
| author | Alexander Kornienko <alexfh@google.com> | Thu Mar 23 15:13:54 2017 +0000 |
| committer | Alexander Kornienko <alexfh@google.com> | Thu Mar 23 15:13:54 2017 +0000 |
| tree | 11cdeec7507024ec483c47d1c74adfe25aeb1d88 | |
| parent | 11ad33912790760552a0f02e5b0c1f813422ddd9 [diff] |
[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