]> granicus.if.org Git - clang/commit
Remove TautologicalInRangeCompare from Extra and TautologicalCompare.
authorNico Weber <nicolasweber@gmx.de>
Thu, 18 Jan 2018 21:40:27 +0000 (21:40 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 18 Jan 2018 21:40:27 +0000 (21:40 +0000)
commit29b35f5859b709c1deebb791aab55f08d02de510
tree23ecbf4831f022d1b235a5ef60ea9e09a3bc77da
parent8bdf43bcaee433f5edb64b90380f0a1d4fc3a78e
Remove TautologicalInRangeCompare from Extra and TautologicalCompare.

This removes the following (already default-off) warnings from -Wextra:
  -Wtautological-type-limit-compare,
  -Wtautological-unsigned-zero-compare
  -Wtautological-unsigned-enum-zero-compare

On the thread "[cfe-dev] -Wtautological-constant-compare issues", clang
code owners Richard Smith, John McCall, and Reid Kleckner as well as
libc++ code owner Marshall Clow stated that these new warnings are not
yet ready for prime time and shouldn't be part of -Wextra.

Furthermore, Vedant Kumar (Apple), Peter Hosek (Fuchsia), and me (Chromium)
expressed the same concerns (Vedant on that thread, Peter on
https://reviews.llvm.org/D39462, me on https://reviews.llvm.org/D41512).

So remove them from -Wextra, and remove TautologicalInRangeCompare from
TautologicalCompare too until they're usable with real-world code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322901 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
test/Sema/tautological-constant-compare.c