[Clang] Switch from TransformExpr to TransformInitializer in places we need to revert...
authorShafik Yaghmour <shafik.yaghmour@intel.com>
Thu, 25 May 2023 16:44:10 +0000 (09:44 -0700)
committerShafik Yaghmour <shafik.yaghmour@intel.com>
Thu, 25 May 2023 16:50:56 +0000 (09:50 -0700)
commit2a23de01e51545d01055229baea4d4a296b65058
tree1f3d5dbafe570a7a8d24d29300cf923a098260c1
parent047e7ff25364277aaf2674c1c6162a3198ca8099
[Clang] Switch from TransformExpr to TransformInitializer in places we need to revert initializer to it syntactic form for Sema

In some cases we are using TransformExpr instead of
TransformInitializer, this results in ExprWithCleanups being dropped and
we are not emitting a destructor as a result.

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

Differential Revision: https://reviews.llvm.org/D151235
clang/lib/Sema/TreeTransform.h
clang/test/Analysis/missing-bind-temporary.cpp
clang/test/CodeGenCXX/gh62818.cpp [new file with mode: 0644]