fixItEncloseTrailingClosure doesn't need a TypeChecker

This commit is contained in:
Hamish Knight
2019-11-06 15:20:07 -08:00
parent 1a81074743
commit b57c86dc1c
3 changed files with 4 additions and 4 deletions

View File

@@ -2974,7 +2974,7 @@ static void checkSwitch(ASTContext &ctx, const SwitchStmt *stmt) {
}
}
void swift::fixItEncloseTrailingClosure(TypeChecker &TC,
void swift::fixItEncloseTrailingClosure(ASTContext &ctx,
InFlightDiagnostic &diag,
const CallExpr *call,
Identifier closureLabel) {
@@ -3010,7 +3010,7 @@ void swift::fixItEncloseTrailingClosure(TypeChecker &TC,
replacement += ": ";
}
lastLoc = Lexer::getLocForEndOfToken(TC.Context.SourceMgr, lastLoc);
lastLoc = Lexer::getLocForEndOfToken(ctx.SourceMgr, lastLoc);
diag
.fixItReplaceChars(lastLoc, closureRange.Start, replacement)
.fixItInsertAfter(closureRange.End, ")");