[clangd] Inject context provider rather than config into ClangdServer. NFC
This is a step towards allowing CDB behavior to being configurable. Previously ClangdServer itself created the configs and installed them into contexts. This was natural as it knows how to deal with resulting diagnostics. However this prevents config being used in CDB, which must be created before ClangdServer. So we extract the context provider (config loader) as a separate object, which publishes diagnostics to a ClangdServer::Callbacks itself. Now initialization looks like: - First create the config::Provider - Then create the ClangdLSPServer, passing config provider - Next, create the context provider, passing config provider + diagnostic callbacks - now create the CDB, passing context provider - finally create ClangdServer, passing CDB, context provider, and diagnostic callbacks Differential Revision: https://reviews.llvm.org/D95087
parent
7388c346
Please register or sign in to comment