================
@@ -1357,6 +1363,19 @@ class Sema final {
// VLAs).
bool InConditionallyConstantEvaluateContext = false;
+ /// Whether we are currently in a context in which temporaries must be
+ /// lifetime-extended (Eg. in a for-range initializer).
+ bool IsInLifetimeExtendingContext = false;
----------------
zygoloid wrote:
I think we should be clear here that this is only for unusual
lifetime-extension contexts, and not just (for example) in an initializer of a
reference.
```suggestion
/// Whether we are currently in a context in which all temporaries must be
/// lifetime-extended, even if they're not bound to a reference (for
example,
/// in a for-range initializer).
bool IsInLifetimeExtendingContext = false;
```
https://github.com/llvm/llvm-project/pull/76361
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits