[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-08-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. In D84811#2199891 , @hokein wrote: > In D84811#2199829 , @kbobyrev wrote: > >> In D84811#2199820 ,

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-08-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D84811#2199829 , @kbobyrev wrote: > In D84811#2199820 , @hokein wrote: > >> In D84811#2199510 , @kbobyrev wrote: >> >>> Even despite `FileFilter`

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-08-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In D84811#2199820 , @hokein wrote: > In D84811#2199510 , @kbobyrev wrote: > >> Even despite `FileFilter` not being fully implemented yet (an issue for a >> separate patch) I think this

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-08-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D84811#2199510 , @kbobyrev wrote: > Even despite `FileFilter` not being fully implemented yet (an issue for a > separate patch) I think this change should still be correct and is probably > OK to land, WDYT @hokein? Yes,

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-08-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev requested review of this revision. kbobyrev added a comment. Even despite `FileFilter` not being fully implemented yet (an issue for a separate patch) I think this change should still be correct and is probably OK to land, WDYT @hokein? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Need tot resolve `FIXME`s around `shouldIndexFile()`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84811/new/ https://reviews.llvm.org/D84811

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/indexer/IndexerMain.cpp:70 SymbolCollector::Options Opts; +Opts.FileFilter = FileFilter; Opts.CountReferences = true; hokein wrote: > `FileFilter` seems more promising, but there

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/indexer/IndexerMain.cpp:70 SymbolCollector::Options Opts; +Opts.FileFilter = FileFilter; Opts.CountReferences = true; `FileFilter` seems more promising, but there are some FIXMEs

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 282147. kbobyrev added a comment. Switch to `SymbolCollector::Options::FileFilter` that is even more straightforward. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84811/new/ https://reviews.llvm.org/D84811

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/indexer/IndexerMain.cpp:112 +if (!IndexRoot.empty()) { + llvm::DenseSet ExcludeIDs; + for (const auto : *Result.Symbols) hokein wrote:

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/indexer/IndexerMain.cpp:112 +if (!IndexRoot.empty()) { + llvm::DenseSet ExcludeIDs; + for (const auto : *Result.Symbols) I think we could reuse the `FileShardedIndex` to do the

[PATCH] D84811: [clangd] Add an option to exclude symbols outside of project root from index

2020-07-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous. Herald added a project: clang. kbobyrev requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. This is useful for the remote index: