hazohelet wrote:

> Where do you think it matters? I can't this of cases where ConstantEvaluated 
> context are nested in one another without some intertwined potentially 
> evaluated context

I was mostly thinking about cases where the array-bound expression appears 
inside immediate function context.
The current checks for "Is this always constant-evaluated?" only see the 
innermost evaluation context (e.g. `Sema::isConstantEvaluated`, and 
`Sema::DiagRuntimeBehavior`), so I hope the newly pushed evaluation contexts on 
`ExprEvalContexts` be strict about whether it's always-constant-evaluated or 
not.
Although this PR is not relevant, for the same reason, I don't think it's ideal 
that potentially-evaluated-contexts appear inside constant-evaluated context.

https://github.com/llvm/llvm-project/pull/66222
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to