-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Add support for SWIFT_RETURNS_(UN)RETAINED for ObjC APIs returning C++ FRT #78230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cxx-interop] Add support for SWIFT_RETURNS_(UN)RETAINED for ObjC APIs returning C++ FRT #78230
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look good to me. I only have some comments about testing inline.
test/Interop/Cxx/foreign-reference/Inputs/cxx-functions-and-methods-returning-frt.h
Outdated
Show resolved
Hide resolved
test/Interop/Cxx/foreign-reference/Inputs/cxx-functions-and-methods-returning-frt.h
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch looks good to me, though as @Xazax-hun suggested you should split out the ObjC/Foundation test code into a separate test so that it only runs on supported platforms.
By the way, without your patch, what is the behavior of the Swift compiler when you try to compile ObjC code annotated with If so, you could clarify your commit message to specify that this patch fixes support for |
…s returning C++ FRT rdar://135360972
cbd4b3a
to
426d471
Compare
@swift-ci please smoke test |
|
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Extending #75897 so that the new annotations
SWIFT_RETURNS_(UN)RETAINED
can be used on ObjC APIs as well.rdar://135360972