Skip to content

[cxx-interop] Fix nested structs for non-opaque types #80495

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

Merged
merged 1 commit into from
Apr 4, 2025

Conversation

Xazax-hun
Copy link
Contributor

The test for nested constructs used library evolution forcing all types to be opaque. As a result some code paths for non-opaque types were not updated to support nested types. This patch updates the rest of the code making sure we use fully qualified names (so they also work in the context of the nested classes), and generate correct names for the C compatibility structs that cannot contain "::".

Fixes #80291

rdar://147882976

The test for nested constructs used library evolution forcing all types
to be opaque. As a result some code paths for non-opaque types were not
updated to support nested types. This patch updates the rest of the code
making sure we use fully qualified names (so they also work in the
context of the nested classes), and generate correct names for the C
compatibility structs that cannot contain "::".

Fixes #80291

rdar://147882976
@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Apr 3, 2025
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun Xazax-hun merged commit 95bd086 into main Apr 4, 2025
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/nested-reverse-interop-fixes branch April 4, 2025 16:00
Xazax-hun pushed a commit that referenced this pull request Apr 8, 2025
This test is not executed by the pre-commit CI, so the failure went
unnoticed after #80495. This PR updates the test to make the CI pass.

rdar://148665873
j-hui pushed a commit that referenced this pull request Apr 21, 2025
This test is not executed by the pre-commit CI, so the failure went
unnoticed after #80495. This PR updates the test to make the CI pass.

rdar://148665873
(cherry picked from commit c0b1fa1)
j-hui pushed a commit that referenced this pull request Apr 21, 2025
This test is not executed by the pre-commit CI, so the failure went
unnoticed after #80495. This PR updates the test to make the CI pass.

rdar://148665873
(cherry picked from commit c0b1fa1)
j-hui pushed a commit that referenced this pull request Apr 21, 2025
This test is not executed by the pre-commit CI, so the failure went
unnoticed after #80495. This PR updates the test to make the CI pass.

rdar://148665873
(cherry picked from commit c0b1fa1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[cxx-interop] Generated header declarations out of order for nested swift classes
2 participants