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;
42
42
using namespace swift ;
43
43
using namespace swift ::sys;
44
44
45
- void SwiftASTConsumer::failed (StringRef Error) { }
46
-
47
45
// ===----------------------------------------------------------------------===//
48
46
// SwiftInvocation
49
47
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ class SwiftASTConsumer : public std::enable_shared_from_this<SwiftASTConsumer> {
223
223
224
224
// / Creation of the AST failed due to \p Error. The request corresponding to
225
225
// / this consumer should fail.
226
- virtual void failed (StringRef Error);
226
+ virtual void failed (StringRef Error) = 0 ;
227
227
228
228
// / The consumer was cancelled by the \c requestCancellation method and the \c
229
229
// / 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(
2633
2633
void cancelled () override {
2634
2634
Receiver (RequestResult<SemanticTokensResult>::cancelled ());
2635
2635
}
2636
+
2637
+ void failed (StringRef Error) override {
2638
+ LOG_WARN_FUNC (" semantic tokens failed: " << Error);
2639
+ Receiver (RequestResult<SemanticTokensResult>::fromError (Error));
2640
+ }
2636
2641
};
2637
2642
2638
2643
auto Consumer = std::make_shared<SemanticTokensConsumer>(InputBufferName,
Original file line number Diff line number Diff line change @@ -1811,6 +1811,11 @@ static void computeDiagnostics(
1811
1811
void cancelled () override {
1812
1812
Receiver (RequestResult<DiagnosticsResult>::cancelled ());
1813
1813
}
1814
+
1815
+ void failed (StringRef Error) override {
1816
+ LOG_WARN_FUNC (" diagnostics failed: " << Error);
1817
+ Receiver (RequestResult<DiagnosticsResult>::fromError (Error));
1818
+ }
1814
1819
};
1815
1820
1816
1821
auto Consumer = std::make_shared<DiagnosticsConsumer>(std::move (Receiver));
You can’t perform that action at this time.
0 commit comments