Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃崚][cxx-interop] Correctly import fields with type NS_OPTIONS. #66563

Merged
merged 1 commit into from Jun 13, 2023

Conversation

zoecarver
Copy link
Collaborator

Explanation: NS_OPTIONS has a different definition in ObjC/C and C++. The C++ definition makes it hard for us to match up the enum with the typedef (type). We have had to add some ugly special cases that lookup the associated enum using an attribute: findAnonymousEnumForTypedef. We've updated most places that import types to check for this special case, but every now and again we find another edge case. Hopefully this is the last one. This patch adds this special case/lookup when we are importing the type of fields. This bug has been hitting a lot of people, see #65885 and rdar://109830715

Scope: C++ interoperability
Risk: Low, changes a narrow class of API imports; uses same pattern as elsewhere to find NS_OPTIONS.
Testing: Swift unit tests.
PR: #66452

@zoecarver zoecarver requested a review from a team as a code owner June 12, 2023 17:09
@zoecarver
Copy link
Collaborator Author

@swift-ci please test

@zoecarver zoecarver merged commit 97fb1bd into apple:release/5.9 Jun 13, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants