Skip to content

Commit 2c7cc7b

Browse files
[CSDiag] Remove obsolete FailureDiagnosis::visitIdentityExpr from CSDiag
1 parent 4555611 commit 2c7cc7b

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lib/Sema/CSDiag.cpp

-16
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ class FailureDiagnosis :public ASTVisitor<FailureDiagnosis, /*exprresult*/bool>{
221221
validateContextualType(Type contextualType, ContextualTypePurpose CTP);
222222

223223
bool visitExpr(Expr *E);
224-
bool visitIdentityExpr(IdentityExpr *E);
225224
bool visitTryExpr(TryExpr *E);
226225

227226
bool visitApplyExpr(ApplyExpr *AE);
@@ -1582,21 +1581,6 @@ visitRebindSelfInConstructorExpr(RebindSelfInConstructorExpr *E) {
15821581
return false;
15831582
}
15841583

1585-
/// An IdentityExpr doesn't change its argument, but it *can* propagate its
1586-
/// contextual type information down.
1587-
bool FailureDiagnosis::visitIdentityExpr(IdentityExpr *E) {
1588-
auto contextualType = CS.getContextualType(E);
1589-
1590-
// If we have a paren expr and our contextual type is a ParenType, remove the
1591-
// paren expr sugar.
1592-
if (contextualType)
1593-
contextualType = contextualType->getWithoutParens();
1594-
if (!typeCheckChildIndependently(E->getSubExpr(), contextualType,
1595-
CS.getContextualTypePurpose(E)))
1596-
return true;
1597-
return false;
1598-
}
1599-
16001584
/// A TryExpr doesn't change it's argument, nor does it change the contextual
16011585
/// type.
16021586
bool FailureDiagnosis::visitTryExpr(TryExpr *E) {

0 commit comments

Comments
 (0)