mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user