Index: clangd/CodeComplete.cpp =================================================================== --- clangd/CodeComplete.cpp +++ clangd/CodeComplete.cpp @@ -702,11 +702,10 @@ Input.Preamble->CanReuse(*CI, ContentsBuffer.get(), Bounds, Input.VFS.get()); } + CI->getDiagnosticOpts().IgnoreWarnings = true; auto Clang = prepareCompilerInstance( std::move(CI), Input.Preamble, std::move(ContentsBuffer), std::move(Input.PCHs), std::move(Input.VFS), DummyDiagsConsumer); - auto &DiagOpts = Clang->getDiagnosticOpts(); - DiagOpts.IgnoreWarnings = true; // Disable typo correction in Sema. Clang->getLangOpts().SpellChecking = false;