File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
tools/SourceKit/lib/SwiftLang Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ using namespace SourceKit;
4242using namespace swift ;
4343using namespace swift ::sys;
4444
45- void SwiftASTConsumer::failed (StringRef Error) { }
46-
4745// ===----------------------------------------------------------------------===//
4846// SwiftInvocation
4947// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ class SwiftASTConsumer : public std::enable_shared_from_this<SwiftASTConsumer> {
223223
224224 // / Creation of the AST failed due to \p Error. The request corresponding to
225225 // / this consumer should fail.
226- virtual void failed (StringRef Error);
226+ virtual void failed (StringRef Error) = 0 ;
227227
228228 // / The consumer was cancelled by the \c requestCancellation method and the \c
229229 // / ASTBuildOperation creating the AST for this consumer honored the request.
Original file line number Diff line number Diff line change @@ -2633,6 +2633,11 @@ void SwiftLangSupport::getSemanticTokens(
26332633 void cancelled () override {
26342634 Receiver (RequestResult<SemanticTokensResult>::cancelled ());
26352635 }
2636+
2637+ void failed (StringRef Error) override {
2638+ LOG_WARN_FUNC (" semantic tokens failed: " << Error);
2639+ Receiver (RequestResult<SemanticTokensResult>::fromError (Error));
2640+ }
26362641 };
26372642
26382643 auto Consumer = std::make_shared<SemanticTokensConsumer>(InputBufferName,
Original file line number Diff line number Diff line change @@ -1811,6 +1811,11 @@ static void computeDiagnostics(
18111811 void cancelled () override {
18121812 Receiver (RequestResult<DiagnosticsResult>::cancelled ());
18131813 }
1814+
1815+ void failed (StringRef Error) override {
1816+ LOG_WARN_FUNC (" diagnostics failed: " << Error);
1817+ Receiver (RequestResult<DiagnosticsResult>::fromError (Error));
1818+ }
18141819 };
18151820
18161821 auto Consumer = std::make_shared<DiagnosticsConsumer>(std::move (Receiver));
You can’t perform that action at this time.
0 commit comments