commit | f935b562b9a70c9b81e9aa4d113712677fd9764f | [log] [tgz] |
---|---|---|
author | Richard Trieu <rtrieu@google.com> | Sat Apr 05 05:17:01 2014 +0000 |
committer | Richard Trieu <rtrieu@google.com> | Sat Apr 05 05:17:01 2014 +0000 |
tree | 45085d4e3218e41d918ffa72a667e384ed75a9d7 | |
parent | 98db356cc18e142edc3236cc7da7675209d1403d [diff] |
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. llvm-svn: 205665