[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

Richard Trieu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 25 17:42:42 PDT 2019


rtrieu added a comment.

In D69292#1718415 <https://reviews.llvm.org/D69292#1718415>, @thakis wrote:

> Abstractly this lgtm. Do you have any data on true / false positive rates?


Looking at the various warnings in -Wtautological-compare, only -Wtautological-overlap-compare and -Wtautological-bitwise-compare are not on by default.  During my last try with those, they were very high value, and had low or no false posivites.

@xbolva00 linked to someone testing out -Wtautological-compare.  The results don't show any warnings from the bitwise or overlap warnings.

In D69292#1719093 <https://reviews.llvm.org/D69292#1719093>, @aaron.ballman wrote:

> I agree with the changes and want to see this go in, but it needs a test case.


Would this be better if we had a specific test to verify all the warning groups in -Wall?  I could see something using diagtool to list and check all the warnings.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69292/new/

https://reviews.llvm.org/D69292





More information about the cfe-commits mailing list