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
Paths
| Differential D151235
[Clang] Switch from TransformExpr to TransformInitializer in places we need to revert initializer to it syntactic form for Sema ClosedPublic Authored by shafik on May 23 2023, 10:56 AM.
Details Summary 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
Diff Detail Event Timelineshafik added inline comments. Comment Actions Change looks good, test is overly specific IMO.
This revision is now accepted and ready to land.May 25 2023, 6:14 AM Closed by commit rG2a23de01e515: [Clang] Switch from TransformExpr to TransformInitializer in places we need to… (authored by shafik). · Explain WhyMay 25 2023, 9:51 AM This revision was automatically updated to reflect the committed changes. shafik marked an inline comment as done.
Revision Contents
Diff 524799 clang/lib/Sema/TreeTransform.h
clang/test/Analysis/missing-bind-temporary.cpp
clang/test/CodeGenCXX/gh62818.cpp
|
@NoQ I had to update this test due to my fix, since this was documenting a flaw, I am not sure what you want to do with it.
I think it is still useful as a regression and or verification test but you may want to modify it differently.