[PATCH] D49546: [clangd] Implement query iterators for Dex symbol index

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 25 02:02:58 PDT 2018


kbobyrev added inline comments.


================
Comment at: clang-tools-extra/clangd/index/dex/Iterator.cpp:181
+    const auto HighestID = peek();
+    DocID ChildrenToAdvance = 0;
+    while ((ChildrenToAdvance++ < Children.size()) && !reachedEnd() &&
----------------
sammccall wrote:
> I can't follow this one - why is the outer loop needed?
> 
> (It looks like you're using DocID as integer again, but I can't tell why the variable is needed at all)
An artifact from min-heap implementation.


https://reviews.llvm.org/D49546





More information about the cfe-commits mailing list