@@ -1326,30 +1326,6 @@ class ConstraintSystem {
1326
1326
bool walkToDeclPre (Decl *decl) override { return false ; }
1327
1327
};
1328
1328
1329
- class TransferExprTypes : public ASTWalker {
1330
- ConstraintSystem &toCS;
1331
- ConstraintSystem &fromCS;
1332
-
1333
- public:
1334
- TransferExprTypes (ConstraintSystem &toCS, ConstraintSystem &fromCS)
1335
- : toCS(toCS), fromCS(fromCS) {}
1336
-
1337
- Expr *walkToExprPost (Expr *expr) override {
1338
- if (fromCS.hasType (expr))
1339
- toCS.setType (expr, fromCS.getType (expr));
1340
-
1341
- return expr;
1342
- }
1343
-
1344
- // / \brief Ignore statements.
1345
- std::pair<bool , Stmt *> walkToStmtPre (Stmt *stmt) override {
1346
- return { false , stmt };
1347
- }
1348
-
1349
- // / \brief Ignore declarations.
1350
- bool walkToDeclPre (Decl *decl) override { return false ; }
1351
- };
1352
-
1353
1329
public:
1354
1330
1355
1331
void setExprTypes (Expr *expr) {
@@ -1375,10 +1351,6 @@ class ConstraintSystem {
1375
1351
expr->walk (CacheExprTypes (expr, *this , excludeRoot));
1376
1352
}
1377
1353
1378
- void transferExprTypes (ConstraintSystem *oldCS, Expr *expr) {
1379
- expr->walk (TransferExprTypes (*this , *oldCS));
1380
- }
1381
-
1382
1354
// / \brief The current solver state.
1383
1355
// /
1384
1356
// / This will be non-null when we're actively solving the constraint
0 commit comments