Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler-rt/lib/tsan/rtl/tsan_platform_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ void InitializePlatform() {

ThreadEventCallbacks callbacks = {
.create = ThreadCreateCallback,
.start = nullptr,
.terminate = ThreadTerminateCallback,
.destroy = nullptr,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. I thought unmentioned members are guaranteed to be default-initialized.

The semantics of the warning seem to be under discussion:
#68933
#56628

Did this warning pop up with a new version of Clang or was it always there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was picked up by someone building https://github.com/swiftlang/swift (which depends on llvm-project). It seems that they are setting -Wmissing-designated-field-initializers somehow. I rebuilt compiler-rt with the flag and this was the only warning I got, so I figured it's easy enough to clean up. I don't think that the standard llvm CMake build will hit this error, I had to add the flag to my CMAKE_CXX_FLAGS to trigger this.

I agree that this warning feels pedantic.

};
InstallPthreadIntrospectionHook(callbacks);
#endif
Expand Down