================ @@ -5346,7 +5346,6 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result, EvalInfo &Info, const Expr *RetExpr = cast<ReturnStmt>(S)->getRetValue(); FullExpressionRAII Scope(Info); if (RetExpr && RetExpr->isValueDependent()) { - EvaluateDependentExpr(RetExpr, Info); ---------------- mizvekov wrote:
Looking at this again, leaving this line would break this test case: ```C++ template<int N> void g(const char (*)[([]{ return N; })()]) {} template<int N> void g(const char (*)[([]{ return N; })()]) {} void use_g() { g<6>(&"hello"); } ``` On the partial ordering case, N stays dependent, so we hit here. This function assumes that, in certain evaluation modes, this expression has to contain an error. But I don't see how that assumption holds true from the surrounding code. CC @hokein since he implemented this originally, and was the last one to touch this code. https://github.com/llvm/llvm-project/pull/100692 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits