[all-commits] [llvm/llvm-project] b15cba: PR49020: Diagnose brace elision in designated init...

Richard Smith via All-commits all-commits at lists.llvm.org
Wed Feb 3 14:37:16 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b15cbaf5a03d0b32dbc32c37766e32ccf66e6c87
      https://github.com/llvm/llvm-project/commit/b15cbaf5a03d0b32dbc32c37766e32ccf66e6c87
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-02-03 (Wed, 03 Feb 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp

  Log Message:
  -----------
  PR49020: Diagnose brace elision in designated initializers in C++.

This is a corner of the differences between C99 designators and C++20
designators that we'd previously overlooked. As with other such cases,
this continues to be permitted as an extension and allowed by default,
behind the -Wc99-designators warning flag, except in cases where it
leads to a conformance difference (such as in overload resolution and in
a SFINAE context).




More information about the All-commits mailing list