diff options
author | Alexander Kornienko <alexfh@google.com> | 2017-03-23 15:13:54 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2017-03-23 15:13:54 +0000 |
commit | c3acd2e9c048d5e63436cf775760beab21579801 (patch) | |
tree | 11cdeec7507024ec483c47d1c74adfe25aeb1d88 /clang-tools-extra/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp | |
parent | 11ad33912790760552a0f02e5b0c1f813422ddd9 (diff) | |
download | bcm5719-llvm-c3acd2e9c048d5e63436cf775760beab21579801.tar.gz bcm5719-llvm-c3acd2e9c048d5e63436cf775760beab21579801.zip |
[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
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-throw-by-value-catch-by-reference.cpp')
0 files changed, 0 insertions, 0 deletions