[clang] [Clang] SubstituteConstraintExpressionWithoutSatisfaction needs an unevaluated context (PR #123883)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 21 22:49:52 PST 2025
================
@@ -248,6 +248,25 @@ ExprResult Parser::ParseArrayBoundExpression() {
// If we parse the bound of a VLA... we parse a non-constant
// constant-expression!
Actions.ExprEvalContexts.back().InConditionallyConstantEvaluateContext = true;
+ // For a VLA type inside an unevaluated operator like:
+ //
+ // sizeof(typeof(*(int (*)[N])array))
+ //
+ // in which the expression N is supposed to be ODR-used, as is the `array`.
----------------
zyn0217 wrote:
It's already there: https://github.com/llvm/llvm-project/blob/ebb27ccb08e0579825a53b218ff5b2ddc492626a/clang/test/SemaTemplate/concepts-out-of-line-def.cpp#L225-L248
https://github.com/llvm/llvm-project/pull/123883
More information about the cfe-commits
mailing list