[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 23:17:43 PST 2025
HighCommander4 wrote:
> I notice that there are four fields in the Symbol struct that are only relevant for symbols indexed for completion. Presumably these would be candidates for such an extension block?
I think that depends on what proportion of symbols are indexed for completion.
I was imagining a fairly simple, fixed-size extension block; that means the overhead of the extension block is incurred for any symbol which needs any of the fields in the extension block. If the completion-related fields are in the extension blocj, and if the proportion of symbols which need them is high, we are then storing larger extension blocks for many symbols, potentially negating the savings we get from having them in the first place.
We could also consider more involved extension block designs which are dynamically sized to contain only the fields they need, at the expense of more complexity.
https://github.com/llvm/llvm-project/pull/118102
More information about the cfe-commits
mailing list