Skip to content

Commit ddb7bbc

Browse files
committed
[CSDiag] NFC: Remove obsolete trailing closure diagnostics
1 parent 495f14a commit ddb7bbc

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

lib/Sema/CSDiag.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,32 +2021,6 @@ class ArgumentMatcher : public MatchCallArgumentListener {
20212021
return true;
20222022
}
20232023

2024-
bool trailingClosureMismatch(unsigned paramIdx, unsigned argIdx) override {
2025-
Expr *arg = ArgExpr;
2026-
2027-
auto tuple = dyn_cast<TupleExpr>(ArgExpr);
2028-
if (tuple)
2029-
arg = tuple->getElement(argIdx);
2030-
2031-
if (argIdx >= Parameters.size()) {
2032-
TC.diagnose(arg->getLoc(), diag::extra_trailing_closure_in_call)
2033-
.highlight(arg->getSourceRange());
2034-
} else {
2035-
auto &param = Parameters[paramIdx];
2036-
TC.diagnose(arg->getLoc(), diag::trailing_closure_bad_param,
2037-
param.getPlainType())
2038-
.highlight(arg->getSourceRange());
2039-
2040-
auto candidate = CandidateInfo[0];
2041-
if (candidate.getDecl())
2042-
TC.diagnose(candidate.getDecl(), diag::decl_declared_here,
2043-
candidate.getDecl()->getFullName());
2044-
}
2045-
Diagnosed = true;
2046-
2047-
return true;
2048-
}
2049-
20502024
bool diagnose() {
20512025
// Use matchCallArguments to determine how close the argument list is (in
20522026
// shape) to the specified candidates parameters. This ignores the

0 commit comments

Comments
 (0)