mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SourceKit] Re-enable cancellation of non-completion requests
This enables the ability to cancel requests, which aren’t code completion requests, again. Previous crashes in SILGen are prevented by disabling cancellation during the SIL stages. Instead, we add dedicated cancellation checkpoints before and after SIL. rdar://98390926
This commit is contained in:
@@ -1621,6 +1621,10 @@ static void computeDiagnostics(
|
||||
auto Diagnostics = DiagConsumer.getDiagnosticsForBuffer(BufferID);
|
||||
Receiver(RequestResult<DiagnosticsResult>::fromResult(Diagnostics));
|
||||
}
|
||||
|
||||
void cancelled() override {
|
||||
Receiver(RequestResult<DiagnosticsResult>::cancelled());
|
||||
}
|
||||
};
|
||||
|
||||
auto Consumer = std::make_shared<DiagnosticsConsumer>(std::move(Receiver));
|
||||
|
||||
Reference in New Issue
Block a user