Skip to content

Conversation

egorzhdan
Copy link
Contributor

The diagnostic that Swift was emitting (This zero-initializes the backing memory of the struct ...) was flaky, because it was only emitted when the default constructor of a C++ struct was instantiated by Swift. If it was instantiated by Clang, the diagnostic wasn't emitted. There is not a lot of value in it. Let's make the behavior consistent by removing the diagnostic.

rdar://161999293

The diagnostic that Swift was emitting (`This zero-initializes the backing memory of the struct ...`) was flaky, because it was only emitted when the default constructor of a C++ struct was instantiated by Swift. If it was instantiated by Clang, the diagnostic wasn't emitted. There is not a lot of value in it. Let's make the behavior consistent by removing the diagnostic. rdar://161999293
@egorzhdan egorzhdan added the c++ interop Feature: Interoperability with C++ label Oct 8, 2025
@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.

Actually, I am not 100% sure if this is something we want to do. The default constructor created by Clang has different semantics than the default ctor that we synthesized in Swift.

@j-hui
Copy link
Contributor

j-hui commented Oct 8, 2025

Is it flaky in the sense that the same test run on the same machine is non deterministic, or flaky in the sense that its behavior differs depending on subtle platform differences, eg SDK version?

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++
3 participants