@@ -281,22 +281,22 @@ TEST_F(TUSchedulerTests, Cancellation) {
281
281
// R2B
282
282
// U3(WantDiags=Yes)
283
283
// R3 <-- cancelled
284
- std::vector<std::string > DiagsSeen, ReadsSeen, ReadsCanceled;
284
+ std::vector<StringRef > DiagsSeen, ReadsSeen, ReadsCanceled;
285
285
{
286
286
Notification Proceed; // Ensure we schedule everything.
287
287
TUScheduler S (CDB, optsForTest (), captureDiags ());
288
288
auto Path = testPath (" foo.cpp" );
289
289
// Helper to schedule a named update and return a function to cancel it.
290
- auto Update = [&](std::string ID) -> Canceler {
290
+ auto Update = [&](StringRef ID) -> Canceler {
291
291
auto T = cancelableTask ();
292
292
WithContext C (std::move (T.first ));
293
293
updateWithDiags (
294
- S, Path, " //" + ID, WantDiagnostics::Yes,
294
+ S, Path, ( " //" + ID). str () , WantDiagnostics::Yes,
295
295
[&, ID](std::vector<Diag> Diags) { DiagsSeen.push_back (ID); });
296
296
return std::move (T.second );
297
297
};
298
298
// Helper to schedule a named read and return a function to cancel it.
299
- auto Read = [&](std::string ID) -> Canceler {
299
+ auto Read = [&](StringRef ID) -> Canceler {
300
300
auto T = cancelableTask ();
301
301
WithContext C (std::move (T.first ));
302
302
S.runWithAST (ID, Path, [&, ID](llvm::Expected<InputsAndAST> E) {
0 commit comments