[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 2 07:57:38 PDT 2018


On Mon, Apr 2, 2018 at 10:54 AM, Nico Weber via Phabricator via cfe-commits
<cfe-commits at lists.llvm.org> wrote:

> thakis added a comment.
>
> In https://reviews.llvm.org/D44883#1048751, @dblaikie wrote:
>
> > Historically Clang's policy on warnings was, I think, much more
> >  conservative than it seems to be today. There was a strong desire not to
> >  implement off-by-default warnings, and to have warnings with an
> >  exceptionally low false-positive rate - maybe the user-defined operator
> >  detection was either assumed to, or demonstrated to, have a sufficiently
> >  high false positive rate to not meet that high bar.
>
> This is still the case. For a new warning, you should evaluate some large
> open-source codebase and measure true positive and false positive rate and
> post the numbers here.
>

(…and warnings that are useful but have a non-diminishing false positive
rate should go into clang-tidy instead.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180402/b0827544/attachment.html>


More information about the cfe-commits mailing list