Skip to content

Commit 3765316

Browse files
committed
[SourceKit] Run interface generation request on a deep stack
Building the generated interface for WinSDK can overflow the stack. Treat it as a semantic request to run it on a large stack. Fixes swiftlang/sourcekit-lsp#1115 rdar://123944504
1 parent 34c2f92 commit 3765316

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/SourceKit/tools/sourcekitd/lib/Service/Requests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ static void
912912
handleRequestEditorOpenInterface(const RequestDict &Req,
913913
SourceKitCancellationToken CancellationToken,
914914
ResponseReceiver Rec) {
915-
{
915+
handleSemanticRequest(Req, Rec, [Req, Rec]() {
916916
SmallVector<const char *, 8> Args;
917917
if (getCompilerArgumentsForRequestOrEmitError(Req, Args, Rec))
918918
return;
@@ -929,7 +929,7 @@ handleRequestEditorOpenInterface(const RequestDict &Req,
929929
std::optional<StringRef> InterestedUSR = Req.getString(KeyInterestedUSR);
930930
return Rec(editorOpenInterface(*Name, *ModuleName, GroupName, Args,
931931
SynthesizedExtension, InterestedUSR));
932-
}
932+
});
933933
}
934934
935935
static void handleRequestEditorOpenHeaderInterface(

0 commit comments

Comments
 (0)