rsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:15656
   case BO_XorAssign:
-    DiagnoseSelfAssignment(S, LHS, RHS, OpLoc, false);
     CheckIdentityFieldAssignment(LHS, RHS, OpLoc, S);
     break;
----------------
This is the same thing, but for `this->x += this->x`. I think we should also 
suppress those warnings for compound assignment, except when one of the 
operands is an implicit member access and one is an explicit member access 
(`this->x += x;` should still warn if the latter `x` is also interpreted as 
`this->x`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146897/new/

https://reviews.llvm.org/D146897

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

Reply via email to