diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 40b4c78d2093..e1be6b4527d0 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -1019,9 +1019,11 @@ bool semaCodeComplete(std::unique_ptr Consumer, llvm::IntrusiveRefCntPtr 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;