[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #108039)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 11 07:18:27 PDT 2024
================
@@ -7810,9 +7813,11 @@ class Sema final : public SemaBase {
}
bool isInLifetimeExtendingContext() const {
- assert(!ExprEvalContexts.empty() &&
- "Must be in an expression evaluation context");
- return ExprEvalContexts.back().InLifetimeExtendingContext;
+ return currentEvaluationContext().InLifetimeExtendingContext;
+ }
+
+ bool needRebuildDefaultArgOrInit() const {
----------------
erichkeane wrote:
```suggestion
bool needsRebuildOfDefaultArgOrInit() const {
```
https://github.com/llvm/llvm-project/pull/108039
More information about the cfe-commits
mailing list