mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Make SwiftASTConsumer::failed pure virtual
Previously, if a semantic tokens request or diagnostic request failed, we wouldn’t return any response.
This commit is contained in:
@@ -1811,6 +1811,11 @@ static void computeDiagnostics(
|
||||
void cancelled() override {
|
||||
Receiver(RequestResult<DiagnosticsResult>::cancelled());
|
||||
}
|
||||
|
||||
void failed(StringRef Error) override {
|
||||
LOG_WARN_FUNC("diagnostics failed: " << Error);
|
||||
Receiver(RequestResult<DiagnosticsResult>::fromError(Error));
|
||||
}
|
||||
};
|
||||
|
||||
auto Consumer = std::make_shared<DiagnosticsConsumer>(std::move(Receiver));
|
||||
|
||||
Reference in New Issue
Block a user