diff options
| author | Richard Trieu <rtrieu@google.com> | 2014-04-05 05:17:01 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2014-04-05 05:17:01 +0000 |
| commit | 8123887315f245efdafb56f151dd5048afb2f38c (patch) | |
| tree | 55a0b979ffc54c09af96e49ef0b4cbde1b7d7a8b /lib/CodeGen/CGExpr.cpp | |
| parent | 8458c2cf4cc4674fb374fd764783d8892c095f35 (diff) | |
| download | clang-8123887315f245efdafb56f151dd5048afb2f38c.tar.gz clang-8123887315f245efdafb56f151dd5048afb2f38c.tar.bz2 clang-8123887315f245efdafb56f151dd5048afb2f38c.tar.xz | |
Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,
which warns on compound conditionals that always evaluate to the same value.
For instance, (x > 5 && x < 3) will always be false since no value for x can
satisfy both conditions.
This patch also changes the CFG to use these tautological values for better
branch analysis. The test for -Wunreachable-code shows how this change catches
additional dead code.
Patch by Anders Rönnholm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions
