[PATCH] D44883: [Sema] Extend -Wself-assign with -Wself-assign-overloaded to warn on overloaded self-assignment (classes)
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 26 11:41:51 PDT 2018
rjmccall added a comment.
In https://reviews.llvm.org/D44883#1048485, @rjmccall wrote:
> In https://reviews.llvm.org/D44883#1048439, @lebedev.ri wrote:
>
> > In https://reviews.llvm.org/D44883#1048400, @rjmccall wrote:
> >
> > > Yeah, like I said, I'm just worried about the usability of having multiple dimensions of warning group here. Like, do we need both -Wself-assign-field-builtin and -Wself-assign-field-overloaded?
> >
> >
> > I'm not saying that is not a valid concern. I'm simply following the pre-existing practice, which is, as far i'm aware, to split the diag groups if it makes sense.
>
>
> I agree. In general, I think this would be fine; my only concern is because we do already have some splitting along a different dimension, so we do need to stop and think about it. Maybe the answer is that
Sorry, I didn't finish this thought. Maybe we should just treat -Wself-assign-field as an accident of history; we can roll it generally into -Wself-assign and just allow that specific warning to be separately enabled if they want. Or if it isn't a very old flag, maybe we can just remove it entirely.
Repository:
rC Clang
https://reviews.llvm.org/D44883
More information about the cfe-commits
mailing list