Skip to content

[cxx-interop] A few misc. changes from #38675. #39432

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
Sep 29, 2021

Conversation

zoecarver
Copy link
Contributor

These should be obviously correct changes. These issues are exposed by our test suite after #38675 is applied.

@zoecarver zoecarver added the c++ interop Feature: Interoperability with C++ label Sep 23, 2021
@zoecarver zoecarver force-pushed the lazy-pt4-misc-changes branch from 1a83b4a to 60e7a18 Compare September 23, 2021 22:38
These should be obviously correct changes. These issues are exposed by our test suite after swiftlang#38675 is applied.
@zoecarver zoecarver force-pushed the lazy-pt4-misc-changes branch from 60e7a18 to 0adf067 Compare September 23, 2021 22:41
@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test.

@zoecarver
Copy link
Contributor Author

This isn't technically a non-functional change, so I'm going to wait at least until tonight to merge it. This way people have a chance to respond if they want to.

// We don't support those, yet.

if (auto functionTemplate = dyn_cast<clang::FunctionTemplateDecl>(D))
functionDecl = functionTemplate->getAsFunction();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since VisitFunctionTemplateDecl already calls this logic with decl->getAsFunction(), I think this line won't be executed. Are you planning to tweak VisitFunctionTemplateDecl to import decl as is, not as decl->getAsFunction()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think this path is taken yet. This is needed for lazy member loading, when we import the name of every NamedDecl member.

I'm not going to remove decl->getAsFunction yet as it is still needed for some non-operator cases. But that might be a good follow up.

@zoecarver
Copy link
Contributor Author

Thanks for the review, Egor.

I'm going to land this now. If anyone has other comments, I'm happy to make changes in a follow up commit.

@zoecarver zoecarver merged commit 4432453 into swiftlang:main Sep 29, 2021
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.

2 participants