Skip to content

Commit 754afff

Browse files
committed
[Constraint solver] Remove ExprTypeCheckListener::preCheckFailed().
Failures will be reported to clients; this callback is unnecessary.
1 parent 54ac78d commit 754afff

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,6 @@ Expr *ExprTypeCheckListener::appliedSolution(Solution &solution, Expr *expr) {
20352035
return expr;
20362036
}
20372037

2038-
void ExprTypeCheckListener::preCheckFailed(Expr *expr) {}
20392038
void ExprTypeCheckListener::applySolutionFailed(Solution &solution,
20402039
Expr *expr) {}
20412040

@@ -2097,12 +2096,6 @@ class FallbackDiagnosticListener : public ExprTypeCheckListener {
20972096
return BaseListener ? BaseListener->appliedSolution(solution, expr) : expr;
20982097
}
20992098

2100-
void preCheckFailed(Expr *expr) override {
2101-
if (BaseListener)
2102-
BaseListener->preCheckFailed(expr);
2103-
maybeProduceFallbackDiagnostic(expr);
2104-
}
2105-
21062099
void applySolutionFailed(Solution &solution, Expr *expr) override {
21072100
if (BaseListener)
21082101
BaseListener->applySolutionFailed(solution, expr);
@@ -2169,7 +2162,6 @@ Type TypeChecker::typeCheckExpressionImpl(Expr *&expr, DeclContext *dc,
21692162
// First, pre-check the expression, validating any types that occur in the
21702163
// expression and folding sequence expressions.
21712164
if (ConstraintSystem::preCheckExpression(expr, dc, baseCS)) {
2172-
listener.preCheckFailed(expr);
21732165
return Type();
21742166
}
21752167

lib/Sema/TypeChecker.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,6 @@ class ExprTypeCheckListener {
321321
virtual Expr *appliedSolution(constraints::Solution &solution,
322322
Expr *expr);
323323

324-
/// Callback invoked if expression is structurally unsound and can't
325-
/// be correctly processed by the constraint solver.
326-
virtual void preCheckFailed(Expr *expr);
327-
328324
/// Callback invoked if application of chosen solution to
329325
/// expression has failed.
330326
virtual void applySolutionFailed(constraints::Solution &solution, Expr *expr);

0 commit comments

Comments
 (0)