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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 28 09:09:52 PDT 2019


aaron.ballman added a comment.

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

> This is imho basic enough that it doesn't need a test. A test for this doesn't add any value that I can see.


The value comes from having an explicit test to demonstrate the behavior is not an accident, so when someone asks "is this behavior intentional?" the answer is more obvious from the test.

In D69292#1722102 <https://reviews.llvm.org/D69292#1722102>, @rtrieu wrote:

> 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.


Yeah, I think that would be better but I don't think the full -Wall testing is necessary for this change. I was mostly hoping for a trivial test that shows -Wall is sufficient to enable at least one of the tautological checks that was previously disabled.


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

https://reviews.llvm.org/D69292





More information about the cfe-commits mailing list