Skip to content
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

[cxx-interop] Ensure that C++ structs are fully defined #77247

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

egorzhdan
Copy link
Contributor

Swift should never try to import C++ structs that are not fully defined. This is because Clang can't synthesize implicit members of such types, which might be necessary for Swift, e.g. a copy constructor.

This adds an assertion that makes sure that C++ structs are considered to be fully defined by Clang. This condition should already be satisfied.

Swift should never try to import C++ structs that are not fully defined. This is because Clang can't synthesize implicit members of such types, which might be necessary for Swift, e.g. a copy constructor.

This adds an assertion that makes sure that C++ structs are considered to be fully defined by Clang. This condition should already be satisfied.
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Oct 28, 2024
@egorzhdan
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@Xazax-hun Xazax-hun left a comment

Choose a reason for hiding this comment

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

LGTM!

@egorzhdan
Copy link
Contributor Author

@swift-ci please build toolchain Ubuntu 22.04

@egorzhdan egorzhdan merged commit 0ebe45d into main Oct 28, 2024
5 of 6 checks passed
@egorzhdan egorzhdan deleted the egorzhdan/fully-defined branch October 28, 2024 18:53
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