[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #92527)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 17 04:48:25 PDT 2024
================
@@ -14113,12 +14120,9 @@ TreeTransform<Derived>::TransformCXXTemporaryObjectExpr(
return SemaRef.MaybeBindToTemporary(E);
}
- // FIXME: We should just pass E->isListInitialization(), but we're not
- // prepared to handle list-initialization without a child InitListExpr.
SourceLocation LParenLoc = T->getTypeLoc().getEndLoc();
return getDerived().RebuildCXXTemporaryObjectExpr(
- T, LParenLoc, Args, E->getEndLoc(),
- /*ListInitialization=*/LParenLoc.isInvalid());
+ T, LParenLoc, Args, E->getEndLoc(), E->isListInitialization());
----------------
yronglin wrote:
The issue in https://github.com/llvm/llvm-project/pull/87933 caused by `/*ListInitialization=*/LParenLoc.isInvalid()`.
https://github.com/llvm/llvm-project/pull/92527
More information about the cfe-commits
mailing list