@@ -427,6 +427,7 @@ class EffectsHandlingWalker : public ASTWalker {
427
427
}
428
428
429
429
std::pair<bool , Expr*> walkToExprPre (Expr *E) override {
430
+ visitExprPre (E);
430
431
ShouldRecurse_t recurse = ShouldRecurse;
431
432
if (isa<ErrorExpr>(E)) {
432
433
asImpl ().flagInvalidCode ();
@@ -486,6 +487,8 @@ class EffectsHandlingWalker : public ASTWalker {
486
487
ShouldRecurse_t checkForEach (ForEachStmt *S) {
487
488
return ShouldRecurse;
488
489
}
490
+
491
+ void visitExprPre (Expr *expr) { asImpl ().visitExprPre (expr); }
489
492
};
490
493
491
494
// / A potential reason why something might have an effect.
@@ -1098,6 +1101,8 @@ class ApplyClassifier {
1098
1101
// guaranteed to give back None, which leaves our ThrowKind unchanged.
1099
1102
}
1100
1103
}
1104
+
1105
+ void visitExprPre (Expr *expr) { return ; }
1101
1106
};
1102
1107
1103
1108
class FunctionAsyncClassifier
@@ -1182,6 +1187,8 @@ class ApplyClassifier {
1182
1187
1183
1188
return ShouldRecurse;
1184
1189
}
1190
+
1191
+ void visitExprPre (Expr *expr) { return ; }
1185
1192
};
1186
1193
1187
1194
Optional<ConditionalEffectKind>
@@ -2290,6 +2297,8 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
2290
2297
}
2291
2298
2292
2299
private:
2300
+ void visitExprPre (Expr *expr) { return ; }
2301
+
2293
2302
ShouldRecurse_t checkClosure (ClosureExpr *E) {
2294
2303
ContextScope scope (*this , Context::forClosure (E));
2295
2304
scope.enterSubFunction ();
0 commit comments