Skip to content

Commit

Permalink
[clangd] Fold string copy into lambda capture. NFC.
Browse files Browse the repository at this point in the history
llvm-svn: 369679
  • Loading branch information
d0k committed Aug 22, 2019
1 parent f12d56f commit 15ee5ba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clang-tools-extra/clangd/ClangdServer.cpp
Expand Up @@ -582,11 +582,10 @@ void ClangdServer::onFileEvent(const DidChangeWatchedFilesParams &Params) {
void ClangdServer::workspaceSymbols(
llvm::StringRef Query, int Limit,
Callback<std::vector<SymbolInformation>> CB) {
std::string QueryCopy = Query;
WorkScheduler.run(
"getWorkspaceSymbols",
[QueryCopy, Limit, CB = std::move(CB), this]() mutable {
CB(clangd::getWorkspaceSymbols(QueryCopy, Limit, Index,
[Query = Query.str(), Limit, CB = std::move(CB), this]() mutable {
CB(clangd::getWorkspaceSymbols(Query, Limit, Index,
WorkspaceRoot.getValueOr("")));
});
}
Expand Down

0 comments on commit 15ee5ba

Please sign in to comment.