[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
Thu Apr 25 05:45:17 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
----------------
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?
================
Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:52
+ continue;
+ // If this is the first time we see references to a symbol, reset its
+ // Reference count, since filesymbols re-count number of references
----------------
The comment suggests there's something cheesy going on.
Why would FileSymbols recompute the number of references? Can we avoid this complicated logic?
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