[all-commits] [llvm/llvm-project] 5b2963: PR45879: Fix assert when constant evaluating union...

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Jun 9 13:56:34 PDT 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b296385298f9ffb708d454ce107bc9a0cdea5de
      https://github.com/llvm/llvm-project/commit/5b296385298f9ffb708d454ce107bc9a0cdea5de
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/constant-expression-cxx2a.cpp

  Log Message:
  -----------
  PR45879: Fix assert when constant evaluating union assignment.

Consider the form of the first operand of a class assignment not the
second operand when implicitly starting the lifetimes of union members.
Also add a missing check that the assignment call actually came from a
syntactic assignment, not from a direct call to `operator=`.

(cherry picked from commit 30baa5d2a450d5e302d8cba3fc7a26a59d4b7ae1)




More information about the All-commits mailing list