cor3ntin wrote:

> Is it alright to set `InConditionallyConstantEvaluateContext` true only when 
> the outer evaluation context `isAlwaysConstantEvaluatedContext()` so that we 
> can say the array bound expr is always constant-evaluated if it happens in 
> always-constant-evaluated context?

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

> Also, does this change suggest that we let some diagnostic mechanisms 
> consider VLA cases? (e.g. DiagRuntimeBehavior should not early-return if the 
> context is InConditionallyConstantEvaluateContext to diagnose div-by-zero in 
> https://godbolt.org/z/556rKnMTG)

Yes. We probably should fix that (i think it's a separate patch)

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