[clang-tools-extra] r369679 - [clangd] Fold string copy into lambda capture. NFC.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 22 11:09:46 PDT 2019
Author: d0k
Date: Thu Aug 22 11:09:46 2019
New Revision: 369679
URL: http://llvm.org/viewvc/llvm-project?rev=369679&view=rev
Log:
[clangd] Fold string copy into lambda capture. NFC.
Modified:
clang-tools-extra/trunk/clangd/ClangdServer.cpp
Modified: clang-tools-extra/trunk/clangd/ClangdServer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdServer.cpp?rev=369679&r1=369678&r2=369679&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdServer.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdServer.cpp Thu Aug 22 11:09:46 2019
@@ -582,11 +582,10 @@ void ClangdServer::onFileEvent(const Did
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("")));
});
}
More information about the cfe-commits
mailing list