- Fix an issue where temporaries initialized via parenthesized aggregate initialization don't get destroyed.
- Fix an issue where aggregate initialization omits calls to class members' move constructors after a TreeTransform. This occurs because the CXXConstructExpr wrapping the call to the move constructor gets unboxed during a TreeTransform of the wrapping FunctionalCastExpr (as with a InitListExpr), but unlike InitListExpr, we dont reperform the InitializationSequence for the list's expressions to regenerate the CXXConstructExpr. This patch fixes this bug by treating CXXParenListInitExpr identically to InitListExpr in this regard.
Fixes #61145
The input to this function should be a syntactic initializer such as a ParenListExpr, not an already-type-checked semantic initializer such as a CXXParenListInitExpr. The right place to do this unwrapping is in TreeTransform::TransformInitializer, where we unwrap various other kinds of semantic initializer.