[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 03:30:21 PDT 2019
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/index/Background.h:113
+ // Note that FileSymbols counts References by incrementing it per each file
+ // mentioning the symbol, including headers. This contradicts with the
----------------
kadircet wrote:
> ilya-biryukov wrote:
> > We should agree on and stick to a single behavior in both cases.
> > I suggest keeping the current behavior for now (translation units). Why can't we implement that?
> Because `FileSymbols` only knows about file names and has no idea about whether a given file is TU or not. We might add some heuristics on the file extensions, or change SymbolCollector to count number of files(this would require maintaining a cache to de-duplicate references coming from the same files but originating from a different TU).
Update from the offline conversation:
It should be possible to produce the same counts as static-indexer, will wait for an updated revision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59481/new/
https://reviews.llvm.org/D59481
More information about the cfe-commits
mailing list