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:
https://reviews.llvm.org/D50500?vs=160088
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: clang-
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,
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
clang-tools-extra/clangd/index/dex/Iterato
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
http://lists.llvm.org/cgi-bin/mailman/
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())
---
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" implement