[PATCH] D155776: [NFC] Add checks for self-assignment.

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 21 11:27:28 PDT 2023


tahonermann accepted this revision.
tahonermann added a comment.
This revision is now accepted and ready to land.

On second thought, and after having read https://stackoverflow.com/a/9322542/11634221, I think this change is fine. There are legitimate scenarios for which self move assignment should work in the sense that the object value is preserved or is left in a valid but unspecified state; UB should be avoided.


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

https://reviews.llvm.org/D155776



More information about the cfe-commits mailing list