[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] 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-05 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. 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

[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