mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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