Skip to content

Commit 5cbf815

Browse files
authored
Merge pull request #73379 from hamishknight/fix-test
[unittests] Fix a stack use-after-scope
2 parents de6c4bc + 7dc0ec8 commit 5cbf815

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

unittests/SourceKit/SwiftLang/CloseTest.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ class CloseTest : public ::testing::Test {
111111

112112
void getDiagnosticsAsync(
113113
const char *DocName, ArrayRef<const char *> CArgs,
114-
llvm::function_ref<void(const RequestResult<DiagnosticsResult> &)>
115-
callback) {
114+
std::function<void(const RequestResult<DiagnosticsResult> &)> callback) {
116115
auto Args = makeArgs(DocName, CArgs);
117116
getLang().getDiagnostics(DocName, Args, /*VFSOpts*/ std::nullopt,
118117
/*CancelToken*/ {}, callback);

0 commit comments

Comments
 (0)