[CodeGen][ObjC] Call synthesized copy constructor/assignment operator
authorAkira Hatanaka <ahatanaka@apple.com>
Fri, 14 Oct 2022 17:40:24 +0000 (10:40 -0700)
committerAkira Hatanaka <ahatanaka@apple.com>
Fri, 14 Oct 2022 17:40:24 +0000 (10:40 -0700)
commit28f7087c9163f66b07e17bd47a1bfb5d9448467d
treed83097400e2020a90b1f0c90825c8d1b8076bc04
parentccde601f140c79344e67e3a5164524ea3d8f43aa
[CodeGen][ObjC] Call synthesized copy constructor/assignment operator
functions in getter/setter functions of non-trivial C struct properties

This fixes a bug where the getter/setter functions were doing a trivial
copy instead of calling the synthesized functions that copy non-trivial
C struct types.

This fixes https://github.com/llvm/llvm-project/issues/56680.

Differential Revision: https://reviews.llvm.org/D131701
clang/lib/CodeGen/CGObjC.cpp
clang/test/CodeGenObjC/nontrivial-c-struct-property.m [new file with mode: 0644]