smanna12 wrote: > As far as I can tell, `ObjCMethodList` is already self-assignment safe so > long as `PointerIntPair` is. It looks like the latter might not be though > since its copy assignment operator (as implemented via `PunnedPointer`) uses > `memcpy` and it does not guard against self-assignment. I wonder if a change > should instead be made there. Can you share more details from the static > analysis report?
Thank you @tahonermann for reviews and feedbacks. This is what static analyzer tool complains. It does not provide much detailes: ``` In clang::ObjCMethodList::operator =(clang::ObjCMethodList const &): Assignment operator does not check for self-assignment ObjCMethodList &operator=(const ObjCMethodList &L) { //Unsafe assignment operator (SELF_ASSIGN) self_assign: No protection against the object assigning to itself. MethodAndHasMoreThanOneDecl = L.MethodAndHasMoreThanOneDecl; NextAndExtraBits = L.NextAndExtraBits; return *this; } https://github.com/llvm/llvm-project/pull/97933 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits