]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r327930:
authordim <dim@FreeBSD.org>
Tue, 16 Jan 2018 08:00:07 +0000 (08:00 +0000)
committerdim <dim@FreeBSD.org>
Tue, 16 Jan 2018 08:00:07 +0000 (08:00 +0000)
commitaf874530b0f44fb960658f50bf0b3f9b8cf3dd33
tree2eba3b908044b091fdc2a9e8bf17199a1cad0958
parent910ab6e4febbbfbc3ca8c1dc6bb069709e51b3cf
MFC r327930:

Pull in r314499 from upstream clang trunk (by Daniel Marjamäki):

  [Sema] Suppress warnings for C's zero initializer

  Patch by S. Gilles!

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

Pull in r314838 from upstream clang trunk (by Richard Smith):

  Suppress -Wmissing-braces warning when aggregate-initializing a
  struct with a single field that is itself an aggregate.

  In C++, such initialization of std::array<T, N> types is guaranteed
  to work by the standard, is completely idiomatic, and the "suggested"
  alternative from Clang was technically invalid.

Together, these suppress unneeded "suggest braces around initialization
of subobject" warnings for C++11 initializer lists.
contrib/llvm/tools/clang/include/clang/AST/Expr.h
contrib/llvm/tools/clang/lib/AST/Expr.cpp
contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp