Callee-destroyed arguments to a method have to be destroyed in the caller function when the receiver is nil as the method doesn't get executed. This fixes PR48207.
rdar://71808391
Paths
| Differential D93273
[CodeGen][ObjC] Destroy callee-destroyed arguments in the caller function when the receiver is nil ClosedPublic Authored by ahatanak on Dec 14 2020, 9:19 PM.
Details Summary Callee-destroyed arguments to a method have to be destroyed in the caller function when the receiver is nil as the method doesn't get executed. This fixes PR48207. rdar://71808391
Diff Detail
Event TimelineComment Actions Hey @ahatanak, I've ran into this problem in my companies projects and was wondering what the status of this patch is? Comment Actions Functionally LGTM. Minor suggestion.
This revision is now accepted and ready to land.Dec 23 2020, 2:51 PM ahatanak marked an inline comment as done. Comment ActionsMake isParamDestroyedInCallee a method of ParmVarDecl. This revision was landed with ongoing or failed builds.Dec 28 2020, 11:52 AM Closed by commit rG34405b41d615: [CodeGen][ObjC] Destroy callee-destroyed arguments in the caller (authored by ahatanak). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 313882 clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/lib/CodeGen/CGObjCMac.cpp
clang/test/CodeGenObjC/objc-dispatch-null-check.m
clang/test/CodeGenObjC/strong-in-c-struct.m
clang/test/CodeGenObjC/weak-in-c-struct.m
clang/test/CodeGenObjCXX/objc-struct-cxx-abi.mm
|
Is this something that could reasonably just be a method on ParmVarDecl?