[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 24 09:11:56 PST 2017
lebedev.ri added a comment.
In https://reviews.llvm.org/D41512#963743, @dim wrote:
> Actually, having thought about it a little more, if the warning is "rather broken", or even "completely broken", depending on one's point of view, then maybe it is better not have it under `-Wextra` either?
In it's current form, there has been zero false-positives. All the complaints
are because it is finding an **actual** issues in the people's code, and people
don't feel like fixing the code because in some other case (data model) the
issue would not be present.
Of course, everyone is welcomed to please do prove me wrong,
and report some actual false-positives that are not data-model-dependant.
> E.g. somebody has to ask for the warning specifically, using `-Wtautological-constant-compare`, or use `-Weverything`?
>
> I ask this, because in FreeBSD we have traditionally been using `-W`, which is (again, historically) an alias for `-Wextra`. We now still have to explicitly use `-Wno-tautological-constant-compare` everywhere. :-(
What @aaron.ballman said in the mail. No one ever will enable it then.
And since it is not actually broken in the first place, i'm a *bit* hesitant to do that.
Though i totally understand the desire to not have bogus warnings,
and so far the clang/clang-analyzer/clang-tidy is the best at that :)
Repository:
rC Clang
https://reviews.llvm.org/D41512
More information about the cfe-commits
mailing list