[clang-tools-extra] [clangd] Let DefineOutline tweak create a definition from scratch (PR #71950)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 18 06:35:48 PDT 2026
timon-ul wrote:
> Given that there was opposition to the general idea by maintainers, it seems appropriate to wait a couple of days before merging, in order to give them time to comment.
Well this would mean waiting forever, since they are not maintainers anymore. That being said now that I read it again it is indeed a valid concern they raised about each code action individually queuing the index. Instead I would like to have a way of code actions sharing index results so if any other one needs the same information it can get it easily (since the lookup is required). For this I would need to spend a bit of time to properly understand how this could be realised to see what seems feasable. A first thought would be a wrapper around the current index with a cache that is newly created when the code actions are requested, but not sure if there is maybe a simpler way of doing this.
The other concern is about it breaking code because it creates a definition if there already exists one due to the index being stale. This one I am not sure if the concern really applies, to run into this you would
- be unaware of a definition
- have a stale index without said definition
so somehow you created a definition that ends up being not in the index and then use the code action and somehow NOT run into any compiler errors, seems unrealistic to me? Or at least so rare I would be surprised if this is strong enough to block this feature.
https://github.com/llvm/llvm-project/pull/71950
More information about the cfe-commits
mailing list