[all-commits] [llvm/llvm-project] 1ac700: [CodeGen] Fix clang crash on aggregate initializat...

Johannes Altmanninger via All-commits all-commits at lists.llvm.org
Wed Nov 27 16:09:36 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ac700cdef787383ad49a0e37d9894491ef19480
      https://github.com/llvm/llvm-project/commit/1ac700cdef787383ad49a0e37d9894491ef19480
  Author: Johannes Altmanninger <aclopte at gmail.com>
  Date:   2019-11-28 (Thu, 28 Nov 2019)

  Changed paths:
    M clang/lib/CodeGen/CGExprAgg.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/CodeGen/ConstantEmitter.h
    A clang/test/CodeGen/label-array-aggregate-init.c

  Log Message:
  -----------
  [CodeGen] Fix clang crash on aggregate initialization of array of labels

Summary: Fix PR43700

The ConstantEmitter in AggExprEmitter::EmitArrayInit was initialized
with the CodeGenFunction set to null, which caused the crash.
Also simplify another call, and make the CGF member a const pointer
since it is public but only assigned in the constructor.

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list