[all-commits] [llvm/llvm-project] b48fb8: Fix crash-on-valid with consteval temporary constr...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Thu Aug 11 10:44:43 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b48fb85fe60b339b31b0381dde481b284e0fb93e
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/CodeGen/CGExprConstant.cpp
    M clang/test/CodeGenCXX/cxx20-consteval-crash.cpp

  Log Message:
  Fix crash-on-valid with consteval temporary construction through list initialization

Clang currently crashes when lowering a consteval list initialization
of a temporary. This is partially working around an issue in the
template instantiation code (TreeTransform::TransformCXXTemporaryObjectExpr())
that does not yet know how to handle list initialization of temporaries
in all cases. However, it's also helping reduce fragility by ensuring
we always have a valid QualType when trying to emit a constant
expression during IR generation.

Fixes #55871

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

More information about the All-commits mailing list