I would like for there to be a warning that warns for the following code: ``` struct s {}; inline void f() { s() = s(); } ``` I know that for a given type, I can prevent this from compiling if I give `s` an lvalue-refererence-qualified assignment operator, but that requires writing two assignment operators and two (sometimes three) constructors to get the behavior I get today from not typing anything, and I have to apply it to every type. It would be much nicer if I could just turn on a warning for this. The only valid use case is if your assignment operator has a side effect that you want.
https://bugs.llvm.org/show_bug.cgi?id=50438 is the matching clang bug, so you can coordinate on naming the flag.
(In reply to David Stone from comment #1) > https://bugs.llvm.org/show_bug.cgi?id=50438 is the matching clang bug, so > you can coordinate on naming the flag. Since it looks like it was confirmed there, I'll confirm it here, too.
(In reply to Eric Gallager from comment #2) > (In reply to David Stone from comment #1) > > https://bugs.llvm.org/show_bug.cgi?id=50438 is the matching clang bug, so > > you can coordinate on naming the flag. > > Since it looks like it was confirmed there, I'll confirm it here, too. Oops, but for real this time