[clang-tools-extra] [clangd] Re-land "support outgoing calls in call hierarchy" (PR #117673)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 28 00:00:31 PST 2024


HighCommander4 wrote:

@kadircet Thanks for having a look. I made a few updates to the PR:

 * Implemented remote index support (https://github.com/llvm/llvm-project/pull/117673/commits/d380984cecf18b53b6e2fdd4266702dcb8ea513a)
 * Implemented a config option (https://github.com/llvm/llvm-project/pull/117673/commits/02bd8f6e342c7dfbedd18c791c9e73e3c0ccb385). I did run into some challenges/limitations here:
   * Only a user config option is respected, not a project config option. I think this limitation is necessary, because the index is a global structure rather than a per-project structure. (Concretely, in the call to the `Dex` constructor that happens via `BackgroundIndexRebuilder::maybeRebuild()`, what path would I pass to the context provider that gets it to look at an appropriate project config file?)
   * Only the `Dex` logic is conditioned on the option, not the binding of the `outgoingCalls` message. This is because the binding of the message happens fairly early, while we're processing the `initialize` request. At this point we haven't loaded config files yet, and if we try, that triggers a `publishDiagnostics` message for the config file, which confuses clients who are expecting an `initialize` response.
 * Bumped index version (https://github.com/llvm/llvm-project/pull/117673/commits/c493674c8519133e1e202194fa55564e75c5a08c)

https://github.com/llvm/llvm-project/pull/117673


More information about the cfe-commits mailing list