================
@@ -44,6 +44,9 @@ void 
CXXSelfAssignmentChecker::checkBeginFunction(CheckerContext &C) const {
     return;
   if (!MD->isCopyAssignmentOperator() && !MD->isMoveAssignmentOperator())
     return;
+  if (!MD->isImplicitObjectMemberFunction())
+    return;
----------------
steakhal wrote:

This doesn't seem to be the right fix for this checker.
My impression would be that `CXXSelfAssignmentChecker` is outght to work 
regardless if the assignment has explicit or implicit obj param.

This also raises an important usability point: the checker devs who just want 
to model a binary operator (like assignment here), they want two svals: LHS and 
RHS.
What convenient ways can we offer to get them these that works regardless if 
the method has explicit or implicit obj param?

https://github.com/llvm/llvm-project/pull/220114
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to