[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 27 05:54:43 PST 2017


lebedev.ri updated this revision to Diff 128226.
lebedev.ri edited the summary of this revision.
lebedev.ri added a comment.
Herald added a subscriber: mehdi_amini.

- Give `warn_tautological_constant_compare` it's own flag `-Wtautological-type-limit-compare`. I'm not happy about that name, but i can't come up with anything better. This way all three of them can be enabled/disabled either altogether, or one-by-one.
- Slightly adjust (enhance) test coverage


Repository:
  rC Clang

https://reviews.llvm.org/D41512

Files:
  include/clang/Basic/DiagnosticGroups.td
  include/clang/Basic/DiagnosticSemaKinds.td
  test/Sema/compare.c
  test/Sema/tautological-constant-compare.c
  test/Sema/tautological-constant-enum-compare.c
  test/Sema/tautological-unsigned-enum-zero-compare.c
  test/Sema/tautological-unsigned-enum-zero-compare.cpp
  test/Sema/tautological-unsigned-zero-compare.c
  test/SemaCXX/compare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41512.128226.patch
Type: text/x-patch
Size: 11452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171227/ec80ec54/attachment-0001.bin>


More information about the cfe-commits mailing list