Egor Zhdan
5b5ffde79e
[cxx-interop] Do not crash when passing Bool as const T& parameter
...
The type bridging logic assumed that if a value of type `Swift.Bool` is passed to a Clang function as an argument, then the type of the parameter must be a Clang built-in type (usually `_Bool`). This is not always correct. For instance, the type might be a templated const reference.
rdar://125508505
2024-05-09 15:28:33 +01:00
Alex Lorenz
62fd801828
[interop] C++ parameter of reference type should be imported as its pointee type in Swift even if parameter's type is type alias
...
This finally allows std::vector.push_back to be called with the pushed value directly passed into it
2023-05-03 18:23:03 -07:00
zoecarver
16c8d0b4d3
[cxx-interop] Bail on parameter that are reference types to dependent types.
...
Currently, just like for return types, we can't import references to dependent types. Refs https://github.com/apple/swift/pull/41660 .
2022-03-29 14:58:55 -07:00
zoecarver
b839741d57
[cxx-interop] Support references to template types.
2022-03-04 13:54:42 -08:00
Zoe Carver
4c62dae594
Merge pull request #41660 from zoecarver/import-ref-to-dependent-type
...
[cxx-interop] Bail on dependent reference types. We don't know how to handle those yet.
2022-03-04 08:58:46 -08:00
zoecarver
5537b72c13
[cxx-interop] Bail on dependent reference types. We don't know how to handle those yet.
2022-03-03 17:15:33 -08:00
Alex Lorenz
ebb21d7ec1
[cxx-interop] Import const T& parameters as T.
...
This change allows Swift code to pass immutable values to const references in C++.
2022-03-03 14:42:27 -08:00
zoecarver
317272852b
[cxx-interop] Bail if the type a reference type is wrapping is unkown.
...
If we can't find the type a reference type is wrapping (the pointee
type), then don't import that type instead of crashing later.
2020-11-01 12:55:44 -08:00
Marcel Hlopko
e293330563
[CxxInterop] Import C++ references. ( #31784 )
2020-05-15 10:42:37 +02:00
Saleem Abdulrasool
6bf7593fd5
Revert "[CxxInterop] Import C++ references." ( #31777 )
2020-05-14 10:43:22 +02:00
Marcel Hlopko
30b5fd52e8
[CxxInterop] Import C++ references. ( #31702 )
2020-05-13 13:34:28 +02:00