Skip to content

Conversation

egorzhdan
Copy link
Contributor

Previously Swift would not import such C++ functions.

rdar://159282319

Previously Swift would not import such C++ functions.

rdar://159282319
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

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

Overall, looks good. I have one question but we might not need to investigate that as part of this PR.

@@ -2382,6 +2382,12 @@ ImportedType ClangImporter::Implementation::importFunctionParamsAndReturnType(
bool allowNSUIntegerAsInt =
shouldAllowNSUIntegerAsInt(isFromSystemModule, clangDecl);

// If this function uses 'auto' return type, try to deduce the actual type.
if (clangDecl->getReturnType()->isUndeducedType())
getClangSema().DeduceReturnType(
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this could make some template instantiations more eager (as we already have the overly eager instantiation problem).

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.

3 participants