[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339426: [clangd] Allow consuming limited number of items (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-10 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 160088. kbobyrev marked 2 inline comments as done. https://reviews.llvm.org/D50500 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp clang-tools-extra/clangd/index/dex/Iterator.h clang-tools-extra/unittests/clangd/DexIndexTests.cpp Index:

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/unittests/clangd/DexIndexTests.cpp:252 + auto DocIterator = create(L0); + EXPECT_THAT(consume(*DocIterator, 42), ElementsAre(4, 7, 8, 20,

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 159959. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Fix the implementation and add test coverage. https://reviews.llvm.org/D50500 Files: clang-tools-extra/clangd/index/dex/Iterator.cpp

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Oops, I thought I pushed "Plan Changes" for this one. https://reviews.llvm.org/D50500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Could you add test? ;) Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:223 std::vector Result; - for (; !It.reachedEnd(); It.advance()) + for (size_t Retreived = 0; !It.reachedEnd() && Retreived < Limit; + It.advance())

[PATCH] D50500: [clangd] Allow consuming limited number of items

2018-08-09 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added reviewers: ioeric, ilya-biryukov. kbobyrev added a project: clang-tools-extra. Herald added subscribers: arphaman, jkorous, MaskRay. This patch modifies `consume` function to allow retrieval of limited number of symbols. This is the "cheap"