Commit Graph

6 Commits

Author SHA1 Message Date
Gabor Horvath
7474a51691 [cxx-interop] Avoid copies when accessing pointee
Previously, we would get two copies, one accessing the pointee and one
when we pass the pointee as a method as the implicit self argument.
These copies are unsafe as they might introduce slicing. When
addressable paramaters features are enabled, we no longer make these
copies for the standard STL types. Custom smart pointers can replicate
this by making the lifetime dependency between the implicit object
parameter and the returned reference of operator* explicit via a
lifetime annotation.

rdar://154213694&128293252&112690482
2025-06-25 17:09:55 +01:00
susmonteiro
72b13b3b48 [cxx-interop] Fix metadata mismatch regarding fields of structs 2025-05-20 10:15:14 +01:00
Gabor Horvath
a8dde60a4e [cxx-interop] Add tests for move-only objects behind smart pointers 2024-09-03 11:38:24 +01:00
Alex Lorenz
633e7f1eb8 fix test 2023-12-02 20:03:36 -08:00
Alex Lorenz
99e6d331fb [cxx-interop] attempt to fix windows unique ptr test 2023-12-01 15:11:41 -08:00
zoecarver
4ba62e1abe [cxx-interop] Add tests for std::unique_ptr. 2023-11-16 10:08:25 -08:00