[Diagnostics] Remove the now-unused AllowInvalidUseOfTrailingClosure

Diagnosis for invalid uses of trailing closures has been folded in
with argument-matching diagnostics, so remove all of the machinery
around the syntactic "mismatched trailing closure" logic.
This commit is contained in:
Doug Gregor
2020-07-17 16:18:05 -07:00
parent 2395225df7
commit 7f2d4e00fc
5 changed files with 0 additions and 95 deletions

View File

@@ -5888,19 +5888,6 @@ bool ExtraneousCallFailure::diagnoseAsError() {
return true;
}
bool InvalidUseOfTrailingClosure::diagnoseAsError() {
emitDiagnostic(diag::trailing_closure_bad_param, getToType())
.highlight(getSourceRange());
if (auto overload = getCalleeOverloadChoiceIfAvailable(getLocator())) {
if (auto *decl = overload->choice.getDeclOrNull()) {
emitDiagnosticAt(decl, diag::decl_declared_here, decl->getName());
}
}
return true;
}
void NonEphemeralConversionFailure::emitSuggestionNotes() const {
auto getPointerKind = [](Type ty) -> PointerTypeKind {
PointerTypeKind pointerKind;