kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

thanks, lgtm!



================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1406
+  Req.Limit = Limit;
+  auto QueryIndex = [&](bool AllowAttributes) {
+    if (Req.IDs.empty() || !Index || Results.References.size() > Limit)
----------------
it might be nicer to make `IDs` a parameter too.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:1409
+      return;
     Results.HasMore |= Index->refs(Req, [&](const Ref &R) {
       // No need to continue process if we reach the limit.
----------------
just thinking out loud, i wonder why we don't just provide a symbolid in this 
callback too. the interface currently says refs will be returned in any order, 
and i am not sure about all the index implementations we have, but i think they 
should be able to provide that for each reference. that way we could get rid of 
multiple index queries (not that it matters too much currently, but it might 
one day..)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95451/new/

https://reviews.llvm.org/D95451

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to