[clang] [Clang] prevent assertion failure in value-dependent initializer expressions (PR #112612)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 17 09:09:30 PDT 2024
================
@@ -11536,6 +11536,9 @@ bool ArrayExprEvaluator::VisitCXXParenListOrInitListExpr(
LValue Subobject = This;
Subobject.addArray(Info, ExprToVisit, CAT);
auto Eval = [&](const Expr *Init, unsigned ArrayIndex) {
+ if (Init->isValueDependent())
----------------
a-tarasyuk wrote:
@shafik https://github.com/llvm/llvm-project/issues/112140#issuecomment-2412422576 I've looked into it, and it seems the value-dependent Init expression
https://github.com/llvm/llvm-project/blob/6f21a7bdeeca84bcc7cf94878e17b5d7ee7b4083/clang/lib/AST/ExprConstant.cpp#L11620-L11621
is causing the assertion failure. Would it be acceptable to try running an evaluation on a dependent expression?
https://github.com/llvm/llvm-project/pull/112612
More information about the cfe-commits
mailing list