[all-commits] [llvm/llvm-project] 185b81: [clang] Fix crash when passing a braced-init list ...

Alan Zhao via All-commits all-commits at lists.llvm.org
Thu Jun 1 17:00:23 PDT 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 185b81e034ba60081023b6e59504dfffb560f3e3
      https://github.com/llvm/llvm-project/commit/185b81e034ba60081023b6e59504dfffb560f3e3
  Author: Alan Zhao <ayzhao at google.com>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/SemaCXX/paren-list-agg-init.cpp

  Log Message:
  -----------
  [clang] Fix crash when passing a braced-init list to a parentehsized aggregate init expression

The previous code incorrectly assumed that we would never call
warnBracedScalarInit(...) with a EK_ParenAggInitMember. This patch fixes
the bug by warning when a scalar member is initialized via a braced-init
list when performing a parentehsized aggregate initialization. This
behavior is consistent with parentehsized list aggregate initialization.

Fixes #63008

Reviewed By: shafik

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




More information about the All-commits mailing list