Skip to content

[cxx-interop] Make borrowing specifiers more precise #78946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

Xazax-hun
Copy link
Contributor

We do not need to borrow from view objects passed by value but we need to borrow from owners taken by const reference regardless of whether it was annotated using lifetimebound or lifetime_capture_by.

@Xazax-hun Xazax-hun added the c++ interop Feature: Interoperability with C++ label Jan 27, 2025
@Xazax-hun Xazax-hun force-pushed the gaborh/fix-calling-convention branch from d3ee691 to ad6d8a6 Compare January 28, 2025 10:21
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test macOS

We do not need to borrow from view objects passed by value but we need
to borrow from owners taken by const reference regardless of whether it
was annotated using lifetimebound or lifetime_capture_by.
@Xazax-hun Xazax-hun force-pushed the gaborh/fix-calling-convention branch from ad6d8a6 to dd3db51 Compare January 29, 2025 12:24
@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

LGTM!

@Xazax-hun Xazax-hun enabled auto-merge January 29, 2025 16:20
@Xazax-hun Xazax-hun merged commit 76de7ec into main Jan 29, 2025
3 checks passed
@Xazax-hun Xazax-hun deleted the gaborh/fix-calling-convention branch January 29, 2025 16:25
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.

2 participants