[clang-tools-extra] r351826 - [clangd] Followup fix of rL351818
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 22 06:48:04 PST 2019
Author: hokein
Date: Tue Jan 22 06:48:04 2019
New Revision: 351826
URL: http://llvm.org/viewvc/llvm-project?rev=351826&view=rev
Log:
[clangd] Followup fix of rL351818
ClangTidyOptions::getDefaults is not free, it will initialize all
clang-tidy modules to get check-specific options, and we don't use this
information in CodeComplete, so using an empty one (constructed by
default constructor) is sufficient.
Modified:
clang-tools-extra/trunk/clangd/CodeComplete.cpp
Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeComplete.cpp?rev=351826&r1=351825&r2=351826&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeComplete.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeComplete.cpp Tue Jan 22 06:48:04 2019
@@ -1019,9 +1019,11 @@ bool semaCodeComplete(std::unique_ptr<Co
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = Input.VFS;
if (Input.Preamble && Input.Preamble->StatCache)
VFS = Input.Preamble->StatCache->getConsumingFS(std::move(VFS));
- auto CI = buildCompilerInvocation(
- ParseInputs{Input.Command, VFS, Input.Contents,
- tidy::ClangTidyOptions::getDefaults()});
+ ParseInputs PInput;
+ PInput.CompileCommand = Input.Command;
+ PInput.FS = VFS;
+ PInput.Contents = Input.Contents;
+ auto CI = buildCompilerInvocation(PInput);
if (!CI) {
elog("Couldn't create CompilerInvocation");
return false;
More information about the cfe-commits
mailing list