[PATCH] D46751: [clangd] Filter out private proto symbols in SymbolCollector.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 15 08:03:53 PDT 2018


ioeric added a comment.

In https://reviews.llvm.org/D46751#1099479, @malaperle wrote:

> In https://reviews.llvm.org/D46751#1099097, @ioeric wrote:
>
> > > I think this is good if that's true that the comment is always there. I think it would be OK for this to be enabled by default, with a general option to turn heuristics off. Not sure what to call it... -use-symbol-filtering-heuristics :)
> >
> > We have other filters in the symbol collector that we think could improve user experience, and we don't provide options for those.
>
>
> What others filters do you mean? If you mean skipping "members", symbols in main files, etc, I a working on making them not skipped, see https://reviews.llvm.org/D44954.


I meant the filters in https://github.com/llvm-mirror/clang-tools-extra/blob/master/clangd/index/SymbolCollector.cpp#L93 e.g. filtering symbols in anonymous namespace, which we think should never appear in the index.

I think members are more interesting than the private proto symbols. We want to un-filter members because there are features that would use them, so indexing them makes sense. But private proto symbols should never be shown to users (e.g. in code completion or workspaceSymbols).

I also think adding an option for indexing members would actually make more sense because they might significantly increase the index size, and it would be good to have options to disable it if users don't use members (e.g. including members can increase size of our internal global index service, and we are not sure if we are ready for that).


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46751





More information about the cfe-commits mailing list