[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-18 Thread Aleksandr Platonov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe35f9229dcb2: [clangd] Ignore the static index refs from the dynamic index files. (authored by ArcsinX). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-18 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312742. ArcsinX added a comment. Fix format Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93393/new/ https://reviews.llvm.org/D93393 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-e

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312538. ArcsinX added a comment. `StringRef` => `llvm::StringRef` in one more place. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93393/new/ https://reviews.llvm.org/D93393 Files: clang-tools-extra/clangd/i

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked an inline comment as done. ArcsinX added a comment. Thank you for review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93393/new/ https://reviews.llvm.org/D93393 ___ cfe-commits mailing l

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312530. ArcsinX added a comment. `unique_function indexedFiles() const` => `unique_function indexedFiles() const` `StringRef` => `llvm::StringRef` for consistency Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312508. ArcsinX added a comment. Fix comment inside IndexClient::indexedFiles() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93393/new/ https://reviews.llvm.org/D93393 Files: clang-tools-extra/clangd/index/

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Fantastic, thanks so much! Comment at: clang-tools-extra/clangd/index/Merge.cpp:129 +StaticContainsFile{Static->indexedFiles()} + ](llvm::StringRef FileURI) mutabl

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312497. ArcsinX added a comment. Make `indexedFiles()` to return `[](StringRef){return false;}` instead of `nullptr`. Add comments. Do not call `indexedFiles()` at every file check for `MergeIndex`. Consume error if `URI::resolve()` fails. Repository: rG

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: kbobyrev. sammccall added a comment. In D93393#2460066 , @ArcsinX wrote: > Thanks for your reply. I have updated the patch (changed signature of > `hasFile`), but remote-index scenario is not clear for me yet. Sorry, I didn'

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, this should work with some slight tweaks. Biggest question is if we really need/want to allow this function to be null. Comment at: clang-tools-extra/clangd/index/Index.h:127 + /// index or not. + virtual llvm::unique_function indexedFiles()

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. Thanks for your reply. I have updated the patch (changed signature of `hasFile`), but remote-index scenario is not clear for me yet. In D93393#2458168 , @sammccall wrote: > Implementing a pseudo-batch form of hasFiles as an RPC f

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-17 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 312440. ArcsinX added a comment. bool SymbolIndex::hasFile(llvm::StringRef) => llvm::unique_function SymbolIndex::indexedFiles() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93393/new/ https://reviews.llvm.or

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. TL;DR: Cool! I think we should complicate the signature of `hasFile()` a bit to avoid calling SwapIndex::snapshot() for each file. There's also some quadratic behavior due to calling index ops from MergeIndex when children are MergeIndexes, but N is small and I think

[PATCH] D93393: [clangd] Ignore the static index refs from the dynamic index files.

2020-12-16 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang. This patch fixes the following problem: - open a file with references to