diff --git a/src/clang_tu.cc b/src/clang_tu.cc index 2762aa8c8..67f4856d3 100644 --- a/src/clang_tu.cc +++ b/src/clang_tu.cc @@ -121,6 +121,10 @@ buildCompilerInvocation(const std::string &main, std::vector args, driver::Driver d(args[0], llvm::sys::getDefaultTargetTriple(), *diags, "ccls", vfs); #endif d.setCheckInputsExist(false); +#if LLVM_VERSION_MAJOR >= 15 + // For -include b.hh, don't probe b.hh.{gch,pch} and change to -include-pch. + d.setProbePrecompiled(false); +#endif std::unique_ptr comp(d.BuildCompilation(args)); if (!comp) return nullptr;