Skip to content

Commit 0edc5a8

Browse files
committed
[ConstraintSystem] NFC: remove obsolete transferExprTypes
(cherry picked from commit 11e1d13)
1 parent f1a94fe commit 0edc5a8

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

lib/Sema/ConstraintSystem.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,30 +1326,6 @@ class ConstraintSystem {
13261326
bool walkToDeclPre(Decl *decl) override { return false; }
13271327
};
13281328

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-
13531329
public:
13541330

13551331
void setExprTypes(Expr *expr) {
@@ -1375,10 +1351,6 @@ class ConstraintSystem {
13751351
expr->walk(CacheExprTypes(expr, *this, excludeRoot));
13761352
}
13771353

1378-
void transferExprTypes(ConstraintSystem *oldCS, Expr *expr) {
1379-
expr->walk(TransferExprTypes(*this, *oldCS));
1380-
}
1381-
13821354
/// \brief The current solver state.
13831355
///
13841356
/// This will be non-null when we're actively solving the constraint

0 commit comments

Comments
 (0)