[clang-tools-extra] [clangd] Make clangd-indexer respect .clangd configuration files (PR #214951)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 10 11:50:02 PDT 2026
================
@@ -152,6 +166,20 @@ int main(int argc, const char **argv) {
return 1;
}
+ clang::clangd::RealThreadsafeFS TFS;
+ std::vector<std::unique_ptr<clang::clangd::config::Provider>> ProviderStack;
+ if (clang::clangd::EnableConfig)
+ ProviderStack =
+ clang::clangd::config::Provider::createDefaultProviders(TFS);
+ std::vector<const clang::clangd::config::Provider *> ProviderPointers;
+ for (const auto &P : ProviderStack)
+ ProviderPointers.push_back(P.get());
+ auto ConfigProvider =
----------------
JVApen wrote:
I'm not sure if this is a good suggestion, though I wonder if lines 170-178 should be in a separate function in provider. (Returning a struct/pair to guarantee ownership) I'm pretty sure this is a copy from the clangd main. I wouldn't include 179-180 as that requires ClangdServer.
https://github.com/llvm/llvm-project/pull/214951
More information about the cfe-commits
mailing list