[clang] [Clang][Sema] Synthesize a memcpy body for defaulted union assignment (PR #206579)
Adam Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 31 10:49:33 PDT 2026
adams381 wrote:
@erichkeane I think you are referring to the `buildUnionAssignmentCopy` helper, which returned false on failure, so the call sites read `if (ClassDecl->isUnion() && !buildUnionAssignmentCopy(...)) return;`. That was backwards, and both it and the helper are gone now that it is inlined. Both callers check the `buildMemcpyForAssignmentOp` result directly, in the same `if (Copy.isInvalid())` shape as the base and field copies around them.
https://github.com/llvm/llvm-project/pull/206579
More information about the cfe-commits
mailing list