[PATCH] D98364: [clangd] Use ref counted strings throughout for File Contents
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 24 06:33:32 PDT 2021
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Herald added a project: clang-tools-extra.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:678
}
- Server->addDocument(File, NewCode, encodeVersion(Params.textDocument.version),
- WantDiags, Params.forceRebuild);
+ Server->addDocument(File, std::move(NewCode),
+ encodeVersion(Params.textDocument.version), WantDiags,
----------------
you're moving into a stringref here
================
Comment at: clang-tools-extra/clangd/ClangdServer.cpp:214
-void ClangdServer::addDocument(PathRef File, llvm::StringRef Contents,
+void ClangdServer::addDocument(PathRef File, StringRef Contents,
llvm::StringRef Version,
----------------
nit: we generally prefer to qualify the types, can you revert here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98364/new/
https://reviews.llvm.org/D98364
More information about the cfe-commits
mailing list