@@ -1336,30 +1336,6 @@ class ConstraintSystem {
1336
1336
bool walkToDeclPre (Decl *decl) override { return false ; }
1337
1337
};
1338
1338
1339
- class TransferExprTypes : public ASTWalker {
1340
- ConstraintSystem &toCS;
1341
- ConstraintSystem &fromCS;
1342
-
1343
- public:
1344
- TransferExprTypes (ConstraintSystem &toCS, ConstraintSystem &fromCS)
1345
- : toCS(toCS), fromCS(fromCS) {}
1346
-
1347
- Expr *walkToExprPost (Expr *expr) override {
1348
- if (fromCS.hasType (expr))
1349
- toCS.setType (expr, fromCS.getType (expr));
1350
-
1351
- return expr;
1352
- }
1353
-
1354
- // / \brief Ignore statements.
1355
- std::pair<bool , Stmt *> walkToStmtPre (Stmt *stmt) override {
1356
- return { false , stmt };
1357
- }
1358
-
1359
- // / \brief Ignore declarations.
1360
- bool walkToDeclPre (Decl *decl) override { return false ; }
1361
- };
1362
-
1363
1339
public:
1364
1340
1365
1341
void setExprTypes (Expr *expr) {
@@ -1385,10 +1361,6 @@ class ConstraintSystem {
1385
1361
expr->walk (CacheExprTypes (expr, *this , excludeRoot));
1386
1362
}
1387
1363
1388
- void transferExprTypes (ConstraintSystem *oldCS, Expr *expr) {
1389
- expr->walk (TransferExprTypes (*this , *oldCS));
1390
- }
1391
-
1392
1364
// / \brief The current solver state.
1393
1365
// /
1394
1366
// / This will be non-null when we're actively solving the constraint
0 commit comments