================
@@ -6464,6 +6464,9 @@ static ExprResult BuildConvertedConstantExpression(Sema
&S, Expr *From,
if (checkPlaceholderForOverload(S, From))
return ExprError();
+ if (From->containsErrors())
+ return S.CreateRecoveryExpr(From->getBeginLoc(), From->getEndLoc(),
{From}, T);
----------------
mizvekov wrote:
I think just inserting an implicit cast here would be better, instead of the
RecoveryExpr.
One other point: Can this happen in a SFINAE context? If there is somewhere we
are performing error recovery on SFINAE, continuing can lead to observable side
effects, like implicit template instantiations.
So whatever produced an expression with an error before we got here, should
have probably just returned an ExprError() instead.
https://github.com/llvm/llvm-project/pull/184210
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits