]> granicus.if.org Git - clang/commit
[Sema] Suppress additional warnings for C's zero initializer
authorPeter Wu <peter@lekensteyn.nl>
Tue, 16 Jul 2019 01:13:36 +0000 (01:13 +0000)
committerPeter Wu <peter@lekensteyn.nl>
Tue, 16 Jul 2019 01:13:36 +0000 (01:13 +0000)
commit797ddf119a7d1b6d6cda28d0ffdfd13ebb4778c2
tree6e50b27c3bcb0c22e9ac353f2659455f84bff728
parentbc33320ab1eefc2eeb08017857d7c4bb3ee8cab5
[Sema] Suppress additional warnings for C's zero initializer

Summary:
D28148 relaxed some checks for assigning { 0 } to a structure for all C
standards, but it failed to handle structures with non-integer
subobjects. Relax -Wmissing-braces checks for such structures, and add
some additional tests.

This fixes PR39931.

Patch By: al3xtjames

Reviewed By: Lekensteyn

Differential Revision: https://reviews.llvm.org/D61838

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366163 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Expr.cpp
test/Sema/zero-initializer.c