This is an archive of the discontinued LLVM Phabricator instance.

Silently accept -Wgnu-empty-initializer
ClosedPublic

Authored by aaron.ballman on Aug 9 2023, 7:05 AM.

Details

Summary

https://github.com/llvm/llvm-project/commit/5d8aaad4452f60ba8902e921d9bed606713a8f26 removed the warning group as the functionality is no longer a GNU extension. However, users have asked for the warning group to be supported so that code transitioning from Clang 16 to Clang 17 has an easier migration path when compiling with -Werror. This patch restores the warning group, but as an ignored warning group because the functionality is now always considered to be a C extension rather than a GNU extension. This allows users to do -Werror -pedantic -Wno-gnu-empty-intializer -Wno-c2x-extensions to silence the diagnostics in both Clang 16 and Clang 17.

This patch has no release notes because this is changing the behavior of something changed during the Clang 17 cycle.

Fixes https://github.com/llvm/llvm-project/issues/64357

Diff Detail

Event Timeline

aaron.ballman created this revision.Aug 9 2023, 7:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 7:05 AM
aaron.ballman requested review of this revision.Aug 9 2023, 7:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 7:05 AM
nickdesaulniers accepted this revision.Aug 9 2023, 10:19 AM
This revision is now accepted and ready to land.Aug 9 2023, 10:19 AM
This revision was automatically updated to reflect the committed changes.