8 Commits

Author SHA1 Message Date
Podchishchaeva, Mariya
5cda366221 Revert "[clang] Fix false positive -Wmissing-field-initializer for anonymous unions (#70829)"
This reverts commit a01307a6ee788fc6ac2e09e58f0f52e5666def86 and its
follow-up fix 32d5221ec4810dd723ccebaabbda1df5d3b4cfcf.

It caused unexpected warnings emitted for nested designators in C.
2023-12-18 07:08:27 -08:00
Mariya Podchishchaeva
32d5221ec4
[clang] Fix unexpected warnings after a01307a (#75591)
a01307a broke silencing of -Wmissing-field-initializers warnings in C
for nested designators. This fixes the issue.
2023-12-15 15:25:01 +01:00
Mariya Podchishchaeva
a01307a6ee
[clang] Fix false positive -Wmissing-field-initializer for anonymous unions (#70829)
Normally warning is not reported when a field has default initializer.
Do so for anonymous unions with default initializers as well. No release
note since it is a regression in clang 18.

Fixes https://github.com/llvm/llvm-project/issues/70384
2023-12-13 08:48:32 +01:00
Mariya Podchishchaeva
38b4df5e2e
[clang] Fix wrong warning about missing init for flexible array members (#66341)
91088978d712cd7b33610c59f69d87d5a39e3113 shouldn't have removed an
additional check that field has incomplete array type.

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

Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
2023-09-15 10:57:51 +02:00
Carl Norum
58d489fc6e Fix tests to account for new warning "expected ';' at end of declaration list". Sorry, folks!
llvm-svn: 127188
2011-03-07 22:57:45 +00:00
Douglas Gregor
8fba4f22ce Don't complain about missing field initializers when the initializer
list is completely empty, from Lasse Kärkkäinen! Fixes PR7413.

llvm-svn: 106320
2010-06-18 21:43:10 +00:00
John McCall
6b0dcd9dd1 Remember the PR number.
llvm-svn: 98276
2010-03-11 19:33:57 +00:00
John McCall
e40b58ec2f Implement -Wmissing-field-initializers. Patch by mikem!
llvm-svn: 98275
2010-03-11 19:32:38 +00:00