[clang] [Clang] Protect ObjCMethodList assignment operator against self-assignment (PR #97933)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 16 10:10:45 PDT 2024
https://github.com/tahonermann commented:
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?
https://github.com/llvm/llvm-project/pull/97933
More information about the cfe-commits
mailing list