Skip to content

[5.9] Revert "[cxx-interop] Treat un-instantiated templated types as unsafe" #65544

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

Conversation

hyp
Copy link
Contributor

@hyp hyp commented May 1, 2023

This reverts commit c813254.

This caused #65446

Explanation: The change in #64918 caused clang importer to treat methods that return a type like vector<int> as unsafe, unless this vector<int> type is already instantiated as a class template elsewhere in the original Clang module, e.g. a type alias. This change should be reverted, as a method that returns vector<int> should be treated as returning a self contained type and NOT be marked as unsafe.
Scope: Swift's and C++ interoperability, Clang importer.
Risk: Low, rolling back behavior to what we've been living on for a long time.
Testing: Swift unit tests, and manual testing on some Swift samples

@hyp hyp added the c++ interop Feature: Interoperability with C++ label May 1, 2023
@hyp hyp requested a review from a team as a code owner May 1, 2023 17:33
@hyp
Copy link
Contributor Author

hyp commented May 1, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented May 1, 2023

@swift-ci please test source compatibility

@hyp hyp changed the title Revert "[cxx-interop] Treat un-instantiated templated types as unsafe" [5.9] Revert "[cxx-interop] Treat un-instantiated templated types as unsafe" May 1, 2023
@hyp hyp merged commit e5d9ae2 into swiftlang:release/5.9 May 1, 2023
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
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++ 🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants