[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-10-14 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG28f7087c9163: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator (authored by ahatanak). Repository: rG LLVM Github Monorepo

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-10-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131701/new/ https://reviews.llvm.org/D131701

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-09-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 457720. ahatanak added a comment. Deactivate the cleanup that was pushed in `EmitParmDecl`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131701/new/ https://reviews.llvm.org/D131701 Files:

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-09-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Can we check for the right conditions when emitting the setter body and just deactivate the cleanup? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131701/new/ https://reviews.llvm.org/D131701

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-09-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 457620. ahatanak added a comment. Call the move assignment operator in the setter instead of calling the copy assignment operator and the destructor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131701/new/

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-09-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1429 + GetAddrOfLocalVar(*setterMethod->param_begin()), ivar->getType()); + callCStructCopyAssignmentOperator(Dst, Src); +} else { rjmccall wrote: > When the method takes

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-09-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:1429 + GetAddrOfLocalVar(*setterMethod->param_begin()), ivar->getType()); + callCStructCopyAssignmentOperator(Dst, Src); +} else { When the method takes the structure by

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-08-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. There is another bug where an object isn't destructed when a non-trivial C struct property is set. I plan to send a patch that fixes the bug after this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131701/new/

[PATCH] D131701: [CodeGen][ObjC] Call synthesized copy constructor/assignment operator functions in getter/setter functions of non-trivial C struct properties

2022-08-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug where the getter/setter functions were doing a trivial copy instead of calling the synthesized functions