Skip to content

[cxx-interop] Make sure to create empty initializers for C++ structs #67873

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
Aug 14, 2023

Conversation

egorzhdan
Copy link
Contributor

The existing synthesis mechanism had a bug: cxxRecordDecl->hasDefaultConstructor() returns true for C++ types with an implicit default constructor, for instance, pthread_mutexattr_t.

rdar://113708880

@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Aug 10, 2023
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/pthread_mutexattr_t branch from d3770b3 to 5cfd426 Compare August 11, 2023 13:25
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/pthread_mutexattr_t branch from 5cfd426 to b33ab5f Compare August 11, 2023 14:37
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan force-pushed the egorzhdan/pthread_mutexattr_t branch from b33ab5f to fdc029b Compare August 11, 2023 15:48
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

The existing synthesis mechanism had a bug: `cxxRecordDecl->hasDefaultConstructor()` returns true for C++ types with an implicit default constructor, for instance, `pthread_mutexattr_t`.

rdar://113708880
@egorzhdan egorzhdan force-pushed the egorzhdan/pthread_mutexattr_t branch from fdc029b to 4eb9c3b Compare August 14, 2023 16:47
@egorzhdan
Copy link
Contributor Author

@swift-ci please smoke test

@egorzhdan egorzhdan requested a review from hyp August 14, 2023 19:19
@egorzhdan egorzhdan merged commit 41e4a50 into main Aug 14, 2023
@egorzhdan egorzhdan deleted the egorzhdan/pthread_mutexattr_t branch August 14, 2023 20:09
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