Skip to content

[Clang importer] Allow C structs to be noncopyable, too #83361

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
Jul 28, 2025

Conversation

DougGregor
Copy link
Member

In C interoperability mode, respect the ~Copyable annotation on C structs to import them as ~Copyable types.

Fixes rdar://156877772.

In C interoperability mode, respect the ~Copyable annotation on C
structs to import them as ~Copyable types.

Fixes rdar://156877772.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

Copy link
Contributor

@j-hui j-hui left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

LG! Since the CI already passed I am OK with merging without addressing the nit.


module NoncopyableStructs {
header "noncopyable-struct.h"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: missing new line

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add it in a follow-up PR

@DougGregor DougGregor merged commit ca4b0a1 into swiftlang:main Jul 28, 2025
3 checks passed
@DougGregor DougGregor deleted the noncopyable-structs-c-interop branch July 28, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants