Skip to content

Commit d9cfbd3

Browse files
[CSDiag] Remove obsolete code block in visitCoerceExpr
1 parent f145264 commit d9cfbd3

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,16 +1888,6 @@ bool FailureDiagnosis::visitCoerceExpr(CoerceExpr *CE) {
18881888
if (!expr)
18891889
return true;
18901890

1891-
auto ref = expr->getReferencedDecl();
1892-
if (auto *decl = ref.getDecl()) {
1893-
// Without explicit coercion we might end up
1894-
// type-checking sub-expression as unavaible
1895-
// declaration, let's try to diagnose that here.
1896-
if (AvailableAttr::isUnavailable(decl))
1897-
return diagnoseExplicitUnavailability(
1898-
decl, expr->getSourceRange(), CS.DC, dyn_cast<ApplyExpr>(expr));
1899-
}
1900-
19011891
return false;
19021892
}
19031893

0 commit comments

Comments
 (0)