[all-commits] [llvm/llvm-project] d791de: Restrict lvalue-to-rvalue conversions in CGExprCon...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed Apr 13 12:35:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d791de0e25e13cd8ae066e6f0fa03b384502b02e
      https://github.com/llvm/llvm-project/commit/d791de0e25e13cd8ae066e6f0fa03b384502b02e
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2022-04-13 (Wed, 13 Apr 2022)

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

  Log Message:
  -----------
  Restrict lvalue-to-rvalue conversions in CGExprConstant.

We were generating wrong code for cxx20-consteval-crash.cpp: instead of
loading a value of a variable, we were using its address as the
initializer.

Found while adding code to verify the size of constant initializers.

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




More information about the All-commits mailing list