This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Don't trim xrefs references if we overran the limit
ClosedPublic

Authored by kadircet on Dec 20 2021, 8:01 AM.

Details

Summary

This preserves all the results we've processed already rather than
throwing them away in the end.
It has some performance implications on the edge cases, in the worst case we
might issue 1 relations and 2 xrefs requests in extra to deduce HasMore
correctly.

Fixes https://github.com/clangd/clangd/issues/204.

Diff Detail

Event Timeline

kadircet created this revision.Dec 20 2021, 8:01 AM
kadircet requested review of this revision.Dec 20 2021, 8:01 AM
sammccall accepted this revision.Dec 20 2021, 8:11 AM
sammccall added inline comments.
clang-tools-extra/clangd/XRefs.cpp
1388

This is a nice optimization.
Mention it in the patch description?

This revision is now accepted and ready to land.Dec 20 2021, 8:11 AM
sammccall added inline comments.Dec 20 2021, 8:14 AM
clang-tools-extra/clangd/XRefs.cpp
1388

Oops, it came from elsewhere!

This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.