Skip to content

[cxx-interop] Import iterator types that are not typedef-ed #67482

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
Jul 24, 2023

Conversation

egorzhdan
Copy link
Contributor

This prevented std::vector<std::string> from being auto-conformed to CxxRandomAccessCollection.

If an iterator type is templated, and does not have an explicit instantiation via a typedef or a using-decl, its specialization will not have an owning Clang module. Make sure we treat it as a part of the Clang module that owns the template decl.

rdar://112762768 / resolves #67410

This prevented `std::vector<std::string>` from being auto-conformed to `CxxRandomAccessCollection`.

If an iterator type is templated, and does not have an explicit instantiation via a typedef or a using-decl, its specialization will not have an owning Clang module. Make sure we treat it as a part of the Clang module that owns the template decl.

rdar://112762768 / resolves #67410
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jul 24, 2023
@egorzhdan egorzhdan requested review from zoecarver and hyp as code owners July 24, 2023 10:29
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan merged commit 43e6e97 into main Jul 24, 2023
@egorzhdan egorzhdan deleted the egorzhdan/vector-of-string branch July 24, 2023 16:29
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.

std::vector<std::string> fails to conform to CxxRandomAccessCollection
2 participants