]> granicus.if.org Git - clang/commit
Revert "[Sema] Diagnose tautological comparison with type's min/max values"
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 12 Oct 2017 22:03:20 +0000 (22:03 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 12 Oct 2017 22:03:20 +0000 (22:03 +0000)
commit720ba14b8e3f5f4fc58b0e2c05c2ca989ea2bac5
tree0f6dd380ddfb67d74e5b6d8da1a005113d210e5a
parent783e107de5a40281aa9a2bde6f816bf0cc7bf4f3
Revert "[Sema] Diagnose tautological comparison with type's min/max values"

This reverts r315614,r315615,r315621,r315622
Breaks http://bb9.pgr.jp/#/builders/20/builds/59

/home/bb9/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:95:17: error: comparison 'long long' > 9223372036854775807 is always false [-Werror,-Wtautological-constant-compare]
    if (max_sec > Lim::max()) return false;
        ~~~~~~~ ^ ~~~~~~~~~~
/home/bb9/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:124:13: error: comparison 'long long' < -9223372036854775808 is always false [-Werror,-Wtautological-constant-compare]
    if (sec < Lim::min() || sec > Lim::max())   return false;
        ~~~ ^ ~~~~~~~~~~
/home/bb9/bootstrap-clang-libcxx-lld-i686-linux/llvm-project/libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:124:33: error: comparison 'long long' > 9223372036854775807 is always false [-Werror,-Wtautological-constant-compare]
    if (sec < Lim::min() || sec > Lim::max())   return false;
                            ~~~ ^ ~~~~~~~~~~
3 errors generated.
--

I'm not yet sure what is the proper fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315631 91177308-0d34-0410-b5e6-96231b3b80d8
docs/ReleaseNotes.rst
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/Analysis/conversion.c
test/Analysis/null-deref-ps.c
test/Sema/outof-range-constant-compare.c
test/Sema/tautological-constant-compare.c [deleted file]
test/Sema/tautological-unsigned-zero-compare.c