mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] Refactor DiagnosticConsumer interface
DiagnosticInfo now holds all the information needed to consume a diagnostic, so remove unneeded parameters from handleDiagnostic.
This commit is contained in:
@@ -1185,12 +1185,8 @@ accept(SourceManager &SM, RegionType RegionType,
|
||||
}
|
||||
|
||||
void RequestRefactoringEditConsumer::handleDiagnostic(
|
||||
SourceManager &SM, SourceLoc Loc, DiagnosticKind Kind,
|
||||
StringRef FormatString, ArrayRef<DiagnosticArgument> FormatArgs,
|
||||
const DiagnosticInfo &Info,
|
||||
const SourceLoc bufferIndirectlyCausingDiagnostic) {
|
||||
Impl.DiagConsumer.handleDiagnostic(SM, Loc, Kind, FormatString, FormatArgs,
|
||||
Info, bufferIndirectlyCausingDiagnostic);
|
||||
SourceManager &SM, const DiagnosticInfo &Info) {
|
||||
Impl.DiagConsumer.handleDiagnostic(SM, Info);
|
||||
}
|
||||
|
||||
class RequestRenameRangeConsumer::Implementation {
|
||||
@@ -1244,13 +1240,9 @@ void RequestRenameRangeConsumer::accept(
|
||||
Impl.accept(SM, RegionType, Ranges);
|
||||
}
|
||||
|
||||
void RequestRenameRangeConsumer::handleDiagnostic(
|
||||
SourceManager &SM, SourceLoc Loc, DiagnosticKind Kind,
|
||||
StringRef FormatString, ArrayRef<DiagnosticArgument> FormatArgs,
|
||||
const DiagnosticInfo &Info,
|
||||
const SourceLoc bufferIndirectlyCausingDiagnostic) {
|
||||
Impl.DiagConsumer.handleDiagnostic(SM, Loc, Kind, FormatString, FormatArgs,
|
||||
Info, bufferIndirectlyCausingDiagnostic);
|
||||
void RequestRenameRangeConsumer::handleDiagnostic(SourceManager &SM,
|
||||
const DiagnosticInfo &Info) {
|
||||
Impl.DiagConsumer.handleDiagnostic(SM, Info);
|
||||
}
|
||||
|
||||
static NameUsage getNameUsage(RenameType Type) {
|
||||
|
||||
Reference in New Issue
Block a user