lebedev.ri added a comment.

In https://reviews.llvm.org/D45766#1097736, @ksu.shadura wrote:

> Hi,


Hi.

> we see the false-positive behavior of -Wno-self-assign-overloaded flag in 
> case of subtraction assignment operator. 
>  The minimal reproducer that we got: https://godbolt.org/g/8PQMpR
>  ...

Could you please clarify, what is the false-positive?
The fact that it fires on overloaded `-=` is intended behavior, and is tested 
in tests, see `cfe/trunk/test/SemaCXX/warn-self-assign-overloaded.cpp`:

  #ifndef DUMMY
    a *= a;
    a /= a; // expected-warning {{explicitly assigning}}
    a %= a; // expected-warning {{explicitly assigning}}
    a += a;
    a -= a; // expected-warning {{explicitly assigning}}
    a <<= a;
    a >>= a;
    a &= a; // expected-warning {{explicitly assigning}}
    a |= a; // expected-warning {{explicitly assigning}}
    a ^= a; // expected-warning {{explicitly assigning}}
  #endif



> Thanks in advance!




Repository:
  rL LLVM

https://reviews.llvm.org/D45766



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to