swift
607dd4a7 - [cxx-interop] Import nullability of templated function parameters correctly

Commit
144 days ago
[cxx-interop] Import nullability of templated function parameters correctly This teaches ClangImporter to respect the `_Nonnull`/`_Nullable` arguments on templated function parameters. Previously Swift would only import a non-annotated function overload. Using an overload that has either `_Nonnull` or `_Nullable` would result in a compiler error. The non-annotated overload would get imported with incorrect nullability: Swift would always assume non-null pointers, which was inconsistent with non-templated function parameters, which are mapped to implicitly unwrapped optionals. With this change all three possible overloads are imported, and all of them get the correct nullability in Swift. rdar://151939344
Author
Committer
Parents
Loading