@@ -427,6 +427,7 @@ class EffectsHandlingWalker : public ASTWalker {
427427 }
428428
429429 std::pair<bool , Expr*> walkToExprPre (Expr *E) override {
430+ visitExprPre (E);
430431 ShouldRecurse_t recurse = ShouldRecurse;
431432 if (isa<ErrorExpr>(E)) {
432433 asImpl ().flagInvalidCode ();
@@ -486,6 +487,8 @@ class EffectsHandlingWalker : public ASTWalker {
486487 ShouldRecurse_t checkForEach (ForEachStmt *S) {
487488 return ShouldRecurse;
488489 }
490+
491+ void visitExprPre (Expr *expr) { asImpl ().visitExprPre (expr); }
489492};
490493
491494// / A potential reason why something might have an effect.
@@ -1098,6 +1101,8 @@ class ApplyClassifier {
10981101 // guaranteed to give back None, which leaves our ThrowKind unchanged.
10991102 }
11001103 }
1104+
1105+ void visitExprPre (Expr *expr) { return ; }
11011106 };
11021107
11031108 class FunctionAsyncClassifier
@@ -1182,6 +1187,8 @@ class ApplyClassifier {
11821187
11831188 return ShouldRecurse;
11841189 }
1190+
1191+ void visitExprPre (Expr *expr) { return ; }
11851192 };
11861193
11871194 Optional<ConditionalEffectKind>
@@ -2290,6 +2297,8 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
22902297 }
22912298
22922299private:
2300+ void visitExprPre (Expr *expr) { return ; }
2301+
22932302 ShouldRecurse_t checkClosure (ClosureExpr *E) {
22942303 ContextScope scope (*this , Context::forClosure (E));
22952304 scope.enterSubFunction ();
0 commit comments