diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2017-10-12 20:16:51 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2017-10-12 20:16:51 +0000 |
commit | bd1fc22043b74078acb7b546995a35d8dbd8bd80 (patch) | |
tree | 0c047fb31337004a31a666478e48db7be4bbf52f /llvm/lib/Transforms/Scalar/SCCP.cpp | |
parent | 060cb437215c1fbcfa3cd0c8d3643ec041336bce (diff) | |
download | bcm5719-llvm-bd1fc22043b74078acb7b546995a35d8dbd8bd80.tar.gz bcm5719-llvm-bd1fc22043b74078acb7b546995a35d8dbd8bd80.zip |
[Sema] Diagnose tautological comparison with type's min/max values
Summary:
Currently, clang only diagnoses completely out-of-range comparisons (e.g. `char` and constant `300`),
and comparisons of unsigned and `0`. But gcc also does diagnose the comparisons with the
`std::numeric_limits<>::max()` / `std::numeric_limits<>::min()` so to speak
Finally Fixes https://bugs.llvm.org/show_bug.cgi?id=34147
Continuation of https://reviews.llvm.org/D37565
Reviewers: rjmccall, rsmith, aaron.ballman
Reviewed By: rsmith
Subscribers: rtrieu, jroelofs, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D38101
llvm-svn: 315614
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
0 files changed, 0 insertions, 0 deletions