Skip to content

[cxx-interop] Check for unsafe types of default arguments consistently #71181

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, 2024

Conversation

egorzhdan
Copy link
Contributor

If the C++ type of a function parameter defines a custom copy constructor, assume that it is safe to use from Swift. This matches the heuristic that we use to detect if a C++ method is safe based on the return type.

rdar://121391798

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Jan 26, 2024
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test macOS

@egorzhdan egorzhdan force-pushed the egorzhdan/default-arg-copy-ctor branch from 0197702 to eefe672 Compare January 26, 2024 17:01
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

If the C++ type of a function parameter defines a custom copy constructor, assume that it is safe to use from Swift. This matches the heuristic that we use to detect if a C++ method is safe based on the return type.

rdar://121391798
@egorzhdan egorzhdan force-pushed the egorzhdan/default-arg-copy-ctor branch from eefe672 to d594f47 Compare January 26, 2024 19:26
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan merged commit 840b1df into main Jan 29, 2024
@egorzhdan egorzhdan deleted the egorzhdan/default-arg-copy-ctor branch January 29, 2024 16:13
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.

1 participant