[PATCH] D51090: [clangd] Add index benchmarks

2018-08-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162381. kbobyrev added a comment. Rebase on top of parent patch. https://reviews.llvm.org/D51090 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/benchmarks/CMakeLists.txt clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp

[PATCH] D51287: [clangd] Use TRUE iterator instead of complete posting list

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. kbobyrev edited the summary of this revision. Stop using `$$$` (empty) trigram and generating a posting list with a

[PATCH] D51292: [clang-rename] Update documentation

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. Herald added a subscriber: kadircet. Clangd has way better editor support compared to the ad-hoc integration I created before and we should point users to Clangd mentioning that they could still use standalone tool

[PATCH] D51292: [clang-rename] Update documentation

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162643. kbobyrev added a comment. Add missing `_` after the link. https://reviews.llvm.org/D51292 Files: clang-tools-extra/docs/clang-rename.rst Index: clang-tools-extra/docs/clang-rename.rst

[PATCH] D51287: [clangd] Use TRUE iterator instead of complete posting list

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340729: [clangd] Use TRUE iterator instead of complete posting list (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D5128

[PATCH] D51293: [docs] Mention clangd-dev in clangd documentation

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Since the clangd-dev is intended to be the place for clangd-related discussions, we should point

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. https://reviews.llvm.org/D51297 Files: clang-tools-extra/docs/clangd-vim.rst clang-tools-ext

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. I need to - Complete last two sections - Make sure everything is rendered as expected - Proof-read the text https://reviews.llvm.org/D51297 ___ cfe-commits mailing list cfe-commit

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51297#1214297, @ilya-biryukov wrote: > Do we want to keep the docs for different editors separate or do we want to > put them all into a single page in case we add more editors? > I would vouch for keeping them on a single page, but that's

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/docs/ClangFormat.rst:97 +Clangd Integration +== ioeric wrote: > We could recomend formatting with clangd in clangd doc, but advertising here > seems a bit odd. I'd suggest dropping this. > > An

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51297#1214321, @JonasToth wrote: > Very nice! Switching to clangd means that YCM is not necessary anymore? Hi! Yeah, basically I wanted to follow up on the mailing list after I get some docs in, but you found this earlier :) The good thin

[PATCH] D51310: [clangd] Implement iterator cost

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, mgrang, jkorous, MaskRay. This patch introduces iterator cost concept to improve the performance of Dex query iter

[PATCH] D51310: [clangd] Implement iterator cost

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. It's probably better to roll out proximity path boosting & actual two-stage filtering before rolling this out. https://reviews.llvm.org/D51310 ___ cfe-commits mailing list cfe-com

[PATCH] D51293: [docs] Mention clangd-dev in clangd documentation

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340749: [docs] Mention clangd-dev in clangd documentation (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51293?vs=16264

[PATCH] D51292: [docs] Update clang-rename documentation

2018-08-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/docs/clang-rename.rst:28 +:program:`clang-rename` infrastructure to handle renaming requests. Because of +much better editor integration and support, it is advised to use +:program:`clangd-rename` as part of :program:`

[PATCH] D50542: [clang-tidy] Add abseil-no-internal-deps check

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tidy/abseil/NoInternalDepsCheck.cpp:24 + auto &SourceManager = Finder->getASTContext().getSourceManager(); + SourceLocation loc = Node.getBeginLoc(); + if (loc.isInvalid()) I think @hokein's comment wasn't addr

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162808. kbobyrev marked an inline comment as done. kbobyrev added a comment. Complete two last paragraphs, address few comments. We haven't figured out whether we should suggest using this particular workflow at this point, but we're discussing the options.

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Dex is now mature enough to be used as the default static index. This patch performs the switch

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162840. kbobyrev added a comment. Run `clang-format`. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp ==

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162842. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp ===

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 162865. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51352 Files: clang-tools-extra/clangd/tool/ClangdMain.cpp Index: clang-tools-extra/clangd/tool/ClangdMain.cpp ===

[PATCH] D51352: [clangd] Switch to Dex by default for the static index

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340828: [clangd] Switch to Dex by default for the static index (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51352?vs=

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. kbobyrev added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Instead of parsing and compiling the `llvm::Regex` each time, it's faster to use basic string matching for filename prefix check. https://reviews

[PATCH] D51310: [clangd] Implement iterator cost

2018-08-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163024. kbobyrev marked 6 inline comments as done. This revision is now accepted and ready to land. https://reviews.llvm.org/D51310 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Iterator.h clang-tools-extra/u

[PATCH] D51310: [clangd] Implement iterator cost

2018-08-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:93 + const std::unique_ptr &RHS) { +return LHS->cost() < RHS->cost(); + }); sammccall wrote: > (I'd actually suggest declaring

[PATCH] D51292: [docs] Update clang-rename documentation

2018-08-29 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163025. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Moved the note about Clangd integration to the end, rephrased a bit. https://reviews.llvm.org/D51292 Files: clang-tools-extra/docs/clang-rename.rst Index: clang-tools-extra/do

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, mgrang, jkorous, MaskRay, mgorny. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163294. kbobyrev added a comment. Stop query generation as soon as one valid URI scheme was found. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd

[PATCH] D51310: [clangd] Implement iterator cost

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341057: [clangd] Implement iterator cost (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51310?vs=163024&id=163297#toc Repository: rCTE Clang Tools Extra h

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163302. kbobyrev marked an inline comment as done. kbobyrev added a comment. Ah, correct. I totally forgot about the `^string$` for the exact match. This should not change behavior now. I believe what you propose would make the code easier (there'd only be

[PATCH] D51292: [docs] Update clang-rename documentation

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163305. kbobyrev marked 4 inline comments as done. kbobyrev added a comment. Herald added a subscriber: arphaman. - Fix the `.py` (should be `.el` in the second case) typo - Move piece about rename request to Clangd docs and advertise it htere - Use better wo

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163306. kbobyrev added a comment. Now that there's a Wiki page on how to use Clangd with LanguageClient-neovim, we should just redirect (Neo)Vim users to that page. https://reviews.llvm.org/D51297 Files: clang-tools-extra/docs/clangd.rst Index: clang-

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163309. kbobyrev marked an inline comment as done. kbobyrev added a comment. Mention that the code actually performs `absl/(any|absl|library)` substring match. https://reviews.llvm.org/D51360 Files: clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341061: [clang-tidy] Use simple string matching instead of Regex (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51360?v

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163332. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address couple of comments. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/DexIndex.h:45 + void build(std::shared_ptr> Symbols, + llvm::ArrayRef URISchemes); sammccall wrote: > ioeric wrote: > > URI schemes are property of `Symbols`. We shouldn

[PATCH] D51527: [NFC] Use LLVM naming conventions within FileDistance

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: sammccall, ioeric. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous. https://reviews.llvm.org/D51527 Files: clang-tools-extra/clangd/FileDistance.cpp clang-tools-extra/clangd/FileDistan

[PATCH] D51528: [NFC] Cleanup Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous. - Use consistent assertion messages in iterators implementations - Silence a bunch of clang-tidy warnings: use `emplace_b

[PATCH] D51527: [NFC] Use LLVM naming conventions within FileDistance

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163474. https://reviews.llvm.org/D51527 Files: clang-tools-extra/clangd/FileDistance.cpp clang-tools-extra/clangd/FileDistance.h Index: clang-tools-extra/clangd/FileDistance.h === --- clan

[PATCH] D51528: [NFC] Cleanup Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. The next step would be to move Dex to index/ and slightly simplify file structure, but I guess I should consider doing that after https://reviews.llvm.org/D51422 lands, otherwise it's a lot of effort to keep rebasing everything on top of different patches. https://re

[PATCH] D51527: [NFC] Use LLVM naming conventions within FileDistance

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341182: [NFC] Use LLVM naming conventions within FileDistance (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51527?vs=163474&id=163476#toc Repository: rCTE

[PATCH] D51528: [NFC] Cleanup Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163485. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D51528 Files: clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd/index/dex/DexIndex.h clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/

[PATCH] D51528: [NFC] Cleanup Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341190: [NFC] Cleanup Dex (authored by omtcyfz, committed by ). Herald added subscribers: llvm-commits, ilya-biryukov. Changed prior to commit: https://reviews.llvm.org/D51528?vs=163485&id=163489#toc R

[PATCH] D51475: [clangd] Load YAML static index asynchronously.

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clangd/tool/ClangdMain.cpp:48 +// loading. +class AsyncLoadIndex : public SymbolIndex { +public: Also, do we want only static index to be built asynchronously? Do we want it to be used only in our Clangd tool driver? L

[PATCH] D51422: [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex.

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clangd/index/Index.h:416 + // until the call returns (even if reset() is called). + bool fuzzyFind(const FuzzyFindRequest &, + llvm::function_ref) const override; Do we want these functions to be `fina

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163507. kbobyrev added a comment. Canonicalize URIs, slightly simplify code structure. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd/index/dex/D

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Currently, `SymbolIndex::estimateMemoryUsage()` returns the "overhead" estimate, i.e. the estimate of the Index

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. I should use `SymbolSlab.bytes()` instead of `SymbolSlab.size()`. Either way, something seems to be wrong, because manually checking the `PairedSlabSize` made me suspicious. https://reviews.llvm.org/D51539

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163523. kbobyrev added a comment. Resolved the issues. Measurements show that static Dex index for LLVM takes ~140 MB, ~80 MB of which is the size of `SymbolSlab`. https://reviews.llvm.org/D51539 Files: clang-tools-extra/clangd/index/FileIndex.cpp cl

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163537. kbobyrev marked 14 inline comments as done. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd/index/dex/DexIndex.h clang-tools-extra/clangd/

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163538. kbobyrev marked an inline comment as not done. kbobyrev added a comment. Fix tests https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/dex/DexIndex.cpp clang-tools-extra/clangd/index/d

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/dex/Token.h:54 Scope, +/// Path to symbol declaration. +/// ioeric wrote: > As this is called `Path`, I'd try to decouple it from URIs, so that we don't > need special handli

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-08-31 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. I'll rebase it on top of https://reviews.llvm.org/D51422 and address the last comment before proceeding to the review. https://reviews.llvm.org/D51539 ___ cfe-commits mailing list

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163667. kbobyrev marked 2 inline comments as done. kbobyrev edited the summary of this revision. kbobyrev added a comment. Rebase on top of `master`, s/Path/PathURI/g to be more explicit about the token contents and origin. https://reviews.llvm.org/D51481

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163680. kbobyrev marked 17 inline comments as done. kbobyrev added a comment. Address a round of comments, refactor code. https://reviews.llvm.org/D51481 Files: clang-tools-extra/; clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/inde

[PATCH] D51422: [clangd] Factor out the data-swapping functionality from MemIndex/DexIndex.

2018-09-03 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev accepted this revision. kbobyrev added a comment. This revision is now accepted and ready to land. Other than a hard-coded `buildMemIndex()` in `FileIndex`, I don't have any concerns. That's just a tiny piece, if @ioeric doesn't have any concerns about that too, I think it's good to lan

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163773. kbobyrev marked 12 inline comments as done. kbobyrev added a comment. - Rebase on top of the parent patch - Apply many refactorings where appropriate - Write more comments and documentation - Abstract pieces of code which are shared by multiple pieces

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163786. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Rebase on top of recent revisions. https://reviews.llvm.org/D51539 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-extra/clangd/index/FileIndex.h clang-tools

[PATCH] D51626: [clangd] Move buildStaticIndex() to SymbolYAML

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. `buildStaticIndex()` is used by two other tools that I'm building, now it's useful outside of `tool/ClangdMain.cpp`. https://reviews.llvm.o

[PATCH] D51626: [clangd] Move buildStaticIndex() to SymbolYAML

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163797. kbobyrev added a comment. Move function documentation to the header file. https://reviews.llvm.org/D51626 Files: clang-tools-extra/clangd/index/SymbolYAML.cpp clang-tools-extra/clangd/index/SymbolYAML.h clang-tools-extra/clangd/tool/ClangdMai

[PATCH] D51628: [clangd] Implement a Proof-of-Concept tool for symbol index exploration

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. https://reviews.llvm.org/D51628 Files: clang-tools-extra/clangd/CMakeLists.txt clang

[PATCH] D51628: [clangd] Implement a Proof-of-Concept tool for symbol index exploration

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163800. kbobyrev added a comment. Cleaned up few minor issues. https://reviews.llvm.org/D51628 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/dexplorer/CMakeLists.txt clang-tools-extra/clangd/dexplorer/Dexplorer.cpp Index: c

[PATCH] D51090: [clangd] Add index benchmarks

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163821. kbobyrev edited the summary of this revision. kbobyrev added a comment. - Rebase on top of new code - Simplify code structure and get rid of global state (except for two filenames coming from `main()`) The only problem now is that the generated outp

[PATCH] D51626: [clangd] Move buildStaticIndex() to SymbolYAML

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163823. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Rebase and resolve comments https://reviews.llvm.org/D51626 Files: clang-tools-extra/clangd/index/SymbolYAML.cpp clang-tools-extra/clangd/index/SymbolYAML.h clang-tools-extr

[PATCH] D51626: [clangd] Move buildStaticIndex() to SymbolYAML

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341369: [clangd] Move buildStaticIndex() to SymbolYAML (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51626?vs=163823&i

[PATCH] D51636: [clangd] NFC: Change quality type to float

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. For the sake of consistency, `quality()` should return `float` instead of `double` since all of

[PATCH] D51636: [clangd] NFC: Change quality type to float

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51636#1223204, @sammccall wrote: > If it's not too expensive, we can use the symbol quality metrics (from > Quality.h) to do a more accurate prescore. Worth a benchmark :-) Yes, I agree. We can investigate that quality/performance trade-of

[PATCH] D51636: [clangd] NFC: Change quality type to float

2018-09-04 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341374: [clangd] NFC: Change quality type to float (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51636?vs=163833&id=163837#toc Repository: rCTE Clang Tool

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163987. kbobyrev marked 14 inline comments as done. kbobyrev added a comment. - Rebase on top of master - Address suggestions Eric wrote here - Address suggestions from the offline discussion by reusing `Quality.cpp` infrastructure for path proximity boostin

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. Ping; this one just redirects to the appropriate Wiki entry on GitHub. https://reviews.llvm.org/D51297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51676: [clangd] Use TopN instead of std::priority_queue

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Quality.cpp defines a structure for convenient storage of Top N items, it should be used instead

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164023. kbobyrev marked 5 inline comments as done. kbobyrev added a comment. Address another round of comments. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/FileDistance.h clang-tools-extra/c

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164024. kbobyrev added a comment. Keep 2 minor refactorings out of the scope of this patch. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/FileDistance.h clang-tools-extra/clangd/index/SymbolYA

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164062. kbobyrev marked 18 inline comments as done. kbobyrev added a comment. Address a round of comments https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/FileDistance.h clang-tools-extra/clangd/URI.cpp clang-tools-extra/clangd/URI.h

[PATCH] D51690: [clangd] NFC: mark single-parameter constructors explicit

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov, sammccall. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Code health: prevent implicit conversions to user-defined types. https://reviews.llvm.org/D5169

[PATCH] D51691: [clangd] NFC: Document URIDistance

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: sammccall, ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. `URIDistance` constructor should mention that `Sources` must contain *absolute paths*, not URIs.

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-05 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:623 + + auto I = DexIndex::build(std::move(Builder).build(), URISchemes); + ioeric wrote: > We could use the constructor that doesn't take ownership e.g. > `DexInde

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164172. kbobyrev marked 10 inline comments as done. kbobyrev added a comment. This should address the last round of comments. There was still some hassle with the `SymbolSlab::Builder` in the unit tests and I decided to leave it as it is due to some weird o

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164176. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Resolve the issue with `SymbolSlab::Builder` and make sure passed vector has correct lifetime. https://reviews.llvm.org/D51481 Files: clang-tools-extra/clangd/FileDistance.h

[PATCH] D51481: [clangd] Implement proximity path boosting for Dex

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341542: [clangd] Implement proximity path boosting for Dex (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51481?vs=164176&id=164195#toc Repository: rCTE Cl

[PATCH] D51691: [clangd] NFC: Document URIDistance

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164197. https://reviews.llvm.org/D51691 Files: clang-tools-extra/clangd/FileDistance.h Index: clang-tools-extra/clangd/FileDistance.h === --- clang-tools-extra/clangd/FileDistance.h +++ clan

[PATCH] D51691: [clangd] NFC: Document URIDistance

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked an inline comment as done. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/FileDistance.h:89 public: + // Memorizes paths from \p Sources and builds efficient structure for URI + // distance computations. \p Sources must contain absolute pa

[PATCH] D51690: [clangd] NFC: mark single-parameter constructors explicit

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341543: [clangd] NFC: mark single-parameter constructors explicit (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51690?

[PATCH] D51676: [clangd] Use TopN instead of std::priority_queue

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164200. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51676 Files: clang-tools-extra/clangd/index/MemIndex.cpp Index: clang-tools-extra/clangd/index/MemIndex.cpp === -

[PATCH] D51676: [clangd] Use TopN instead of std::priority_queue

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51676#1225215, @sammccall wrote: > Thanks for cleaning this up! > > I believe this will result in the results from MemIndex being returned in > best -> worst order, rather than worst -> best. > The contract says callers shouldn't rely on th

[PATCH] D51676: [clangd] NFC: Use TopN instead of std::priority_queue

2018-09-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341544: [clangd] NFC: Use TopN instead of std::priority_queue (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51676?vs=1

[PATCH] D51774: [clangd] NFC: Move Dex to clangd/index

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, mgorny. kbobyrev updated this revision to Diff 164367. kbobyrev added a comment. `%s/DexIndex/Dex

[PATCH] D51774: [clangd] NFC: Move Dex to clangd/index

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164367. kbobyrev added a comment. `%s/DexIndex/Dex` https://reviews.llvm.org/D51774 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/index/Dex.cpp clang-tools-extra/clangd/index/Dex.h clang-tools-extra/clangd/index/Iterator.c

[PATCH] D51774: [clangd] NFC: Rename DexIndex to Dex

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164368. kbobyrev retitled this revision from "[clangd] NFC: Move Dex to clangd/index" to "[clangd] NFC: Rename DexIndex to Dex". kbobyrev edited the summary of this revision. https://reviews.llvm.org/D51774 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164369. kbobyrev marked 9 inline comments as done. kbobyrev added a comment. Address a round of comments. https://reviews.llvm.org/D51539 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-extra/clangd/index/Index.cpp clang-tools-extra/c

[PATCH] D51691: [clangd] NFC: Document URIDistance

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE341639: [clangd] NFC: Document URIDistance (authored by omtcyfz, committed by ). Changed prior to commit: https://reviews.llvm.org/D51691?vs=164197&id=164373#toc Repository: rL LLVM https://review

[PATCH] D51691: [clangd] NFC: Document URIDistance

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341639: [clangd] NFC: Document URIDistance (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51691?vs=164197&id=164372#toc

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164377. kbobyrev marked an inline comment as done. https://reviews.llvm.org/D51539 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-extra/clangd/index/Index.cpp clang-tools-extra/clangd/index/Index.h clang-tools-extra/clangd/index/MemI

[PATCH] D51539: [clangd] Add symbol slab size to index memory consumption estimates

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164383. kbobyrev marked an inline comment as done. kbobyrev added a comment. Oh, I thought they're empty. https://reviews.llvm.org/D51539 Files: clang-tools-extra/clangd/index/FileIndex.cpp clang-tools-extra/clangd/index/Index.cpp clang-tools-extra/c

[PATCH] D51090: [clangd] Add index benchmarks

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164414. kbobyrev added a comment. Sync with HEAD https://reviews.llvm.org/D51090 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/benchmarks/CMakeLists.txt clang-tools-extra/clangd/benchmarks/IndexBenchmark.cpp Index: clang-to

[PATCH] D51802: [clangd] Make advanceTo() faster on Posting Lists

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, sammccall, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. If the current element is already beyond advanceTo()'s DocID, just return instead of doing binar

[PATCH] D51802: [clangd] Make advanceTo() faster on Posting Lists

2018-09-07 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164462. kbobyrev edited the summary of this revision. https://reviews.llvm.org/D51802 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp Index: clang-tools-extra/clangd/index/dex/Iterator.cpp ==

[PATCH] D51628: [clangd] Implement a Proof-of-Concept tool for symbol index exploration

2018-09-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/dexplorer/Dexplorer.cpp:39 + +// FIXME(kbobyrev): Make this an actual REPL: probably use LLVM Command Line +// library for parsing flags and arguments. ilya-biryukov wrote: > Maybe we could expo

[PATCH] D51297: [docs] Create a guide for Vim users on how to setup Clangd

2018-09-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. In https://reviews.llvm.org/D51297#1225546, @ilya-biryukov wrote: > I would stamp this from my side, but concerns whether we should recommend > YCM's LSP-based completer instead are probably still there. > @sammccall, WDYT? Yes, I can see your point, but I think this

[PATCH] D51802: [clangd] Make advanceTo() faster on Posting Lists

2018-09-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 164623. kbobyrev marked an inline comment as done. kbobyrev added a comment. Add a short comment on why calling `lower_bound` is redundant. Also, don't spend extra line on return by inverting the condition. https://reviews.llvm.org/D51802 Files: clang-t

<    1   2   3   4   5   6   7   8   9   10   >