[all-commits] [llvm/llvm-project] c9ef33: [Clang] Fix crash when emitting diagnostic for out...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Fri Jul 14 16:00:34 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9ef33e1d8a8aeb68a18f24af6d9fc9ab4ecf257
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2023-07-14 (Fri, 14 Jul 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/SemaCXX/cxx2a-initializer-aggregates.cpp

  Log Message:
  [Clang] Fix crash when emitting diagnostic for out of order designated initializers in C++

In C++ we are not allowed to use designated initializers to initialize fields
out of order. In some cases when diagnosing this we are crashing because we are
not indexing correctly and therefore going out of bounds.

This fixes: https://github.com/llvm/llvm-project/issues/63605

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

More information about the All-commits mailing list