This is an archive of the discontinued LLVM Phabricator instance.

[clangd] references: decls of overrides of x are refs to x, not decls
ClosedPublic

Authored by sammccall on Jan 26 2021, 8:58 AM.

Details

Summary

This requires a second index query for refs to overrides, as the refs
call doesn't tell you which ref points at which symbol.

Diff Detail

Event Timeline

sammccall created this revision.Jan 26 2021, 8:58 AM
sammccall requested review of this revision.Jan 26 2021, 8:58 AM
kadircet accepted this revision.Jan 26 2021, 10:01 AM

thanks, lgtm!

clang-tools-extra/clangd/XRefs.cpp
1406

it might be nicer to make IDs a parameter too.

1409

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..)

This revision is now accepted and ready to land.Jan 26 2021, 10:01 AM
This revision was landed with ongoing or failed builds.Feb 1 2021, 8:19 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.