@@ -3307,10 +3307,10 @@ class ConstraintSystem {
33073307 CacheExprTypes (Expr *expr, ConstraintSystem &cs, bool excludeRoot)
33083308 : RootExpr(expr), CS(cs), ExcludeRoot(excludeRoot) {}
33093309
3310- Expr *walkToExprPost (Expr *expr) override {
3310+ PostWalkResult< Expr *> walkToExprPost (Expr *expr) override {
33113311 if (ExcludeRoot && expr == RootExpr) {
33123312 assert (!expr->getType () && " Unexpected type in root of expression!" );
3313- return expr;
3313+ return Action::Continue ( expr) ;
33143314 }
33153315
33163316 if (expr->getType ())
@@ -3321,16 +3321,18 @@ class ConstraintSystem {
33213321 if (kp->getComponents ()[i].getComponentType ())
33223322 CS.cacheType (kp, i);
33233323
3324- return expr;
3324+ return Action::Continue ( expr) ;
33253325 }
33263326
33273327 // / Ignore statements.
3328- std::pair< bool , Stmt *> walkToStmtPre (Stmt *stmt) override {
3329- return { false , stmt } ;
3328+ PreWalkResult< Stmt *> walkToStmtPre (Stmt *stmt) override {
3329+ return Action::SkipChildren ( stmt) ;
33303330 }
33313331
33323332 // / Ignore declarations.
3333- bool walkToDeclPre (Decl *decl) override { return false ; }
3333+ PreWalkAction walkToDeclPre (Decl *decl) override {
3334+ return Action::SkipChildren ();
3335+ }
33343336 };
33353337
33363338public:
@@ -6751,7 +6753,7 @@ class OverloadSetCounter : public ASTWalker {
67516753 : NumOverloads(overloads)
67526754 {}
67536755
6754- std::pair< bool , Expr *> walkToExprPre (Expr *expr) override {
6756+ PreWalkResult< Expr *> walkToExprPre (Expr *expr) override {
67556757 if (auto applyExpr = dyn_cast<ApplyExpr>(expr)) {
67566758 // If we've found function application and it's
67576759 // function is an overload set, count it.
@@ -6760,7 +6762,7 @@ class OverloadSetCounter : public ASTWalker {
67606762 }
67616763
67626764 // Always recur into the children.
6763- return { true , expr } ;
6765+ return Action::Continue ( expr) ;
67646766 }
67656767};
67666768
0 commit comments