[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer
S. Gilles via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 28 16:28:24 PST 2016
sgilles created this revision.
sgilles added reviewers: cfe-commits, rsmith, zaks.anna.
Add ZeroInitializer as a language option, attached to all standards of
C. Relax checks for -Wmissing-field-initializers and -Wmissing-braces so
that, for such languages, assigning to a structure with { 0 } produces
no warnings. Add tests.
This fixes PR21689, which is mentioned by the Austin Group at
http://austingroupbugs.net/view.php?id=918 . It does not extend this
treatment of { 0 } to C++.
Patch by S. Gilles
https://reviews.llvm.org/D28148
Files:
include/clang/Basic/LangOptions.def
include/clang/Frontend/LangStandard.h
include/clang/Frontend/LangStandards.def
lib/Frontend/CompilerInvocation.cpp
lib/Sema/SemaInit.cpp
test/Sema/zero-initializer.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28148.82626.patch
Type: text/x-patch
Size: 8789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161229/ba12ba8b/attachment.bin>
More information about the cfe-commits
mailing list