[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 16 06:41:48 PDT 2018
lebedev.ri added a comment.
In https://reviews.llvm.org/D44883#1068602, @lebedev.ri wrote:
> There are several options:
>
> 1. @rjmccall's idea: `-wtest` (lowercase), which in this case will disable that new code in `BuildOverloadedBinOp()`. i quite like it actually.
> 2. split it up like i had in the first revision - ``-Wself-assign-builtin``, ``-Wself-assign-field-builtin``; ``-Wself-assign-overloaded``, ``-Wself-assign-field-overloaded``
> - we could just assume that `BuildOverloadedBinOp()` implies overloaded,
> - or check that the particular operator is non-trivial
> 3. ???
>
> @rjmccall, @thakis, @dblaikie, @aaron.ballman, @brooksmoses, @chandlerc
>
> I'm going to go ahead and look into `1.`, since it does not seem there will be any consensus in a timely manner.
... and here it is https://reviews.llvm.org/D45685, please take a look
Repository:
rC Clang
https://reviews.llvm.org/D44883
More information about the cfe-commits
mailing list