================
@@ -221,6 +221,15 @@ ExprResult Parser::ParseConstantExpression() {
return ParseConstantExpressionInExprEvalContext(NotTypeCast);
}
+ExprResult Parser::ParseArrayBoundExpression() {
+ EnterExpressionEvaluationContext ConstantEvaluated(
+ Actions, Sema::ExpressionEvaluationContext::ConstantEvaluated);
+ // If we parse the bound of a VLA... we parse a non-constant
+ // constant-expression!
+ Actions.ExprEvalContexts.back().InConditionallyConstantEvaluateContext =
true;
----------------
erichkeane wrote:
I think I'd rather this be an argument to the above constructor here.
https://github.com/llvm/llvm-project/pull/66222
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits