[clang] [Clang] only inherit the parent eval context inside of lambdas (PR #124426)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 26 06:10:04 PST 2025
================
@@ -13108,14 +13109,16 @@ class Sema final : public SemaBase {
? ExpressionEvaluationContext::ImmediateFunctionContext
: ExpressionEvaluationContext::PotentiallyEvaluated);
if (FD) {
+ auto &Current = S.currentEvaluationContext(),
+ Parent = S.parentEvaluationContext();
----------------
Sirraide wrote:
```suggestion
auto &Current = S.currentEvaluationContext();
auto &Parent = S.parentEvaluationContext();
```
I think this is a bit clearer, because I don’t think you meant to copy the parent evaluation context here, right?
https://github.com/llvm/llvm-project/pull/124426
More information about the cfe-commits
mailing list