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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to