This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Use canonical declarations in ReferenceFinder.
ClosedPublic

Authored by hokein on Oct 4 2018, 2:40 AM.

Details

Summary

handleDeclOccurrencce reports a canonical declartion, so stick to use
canonical declarations to determine whether a declaration is in the
target set.

Also fix a previous ref test which misses a matched label (it fails without this
patch).

Diff Detail

Event Timeline

hokein created this revision.Oct 4 2018, 2:40 AM
sammccall accepted this revision.Oct 4 2018, 2:48 AM

Nice catch!

unittests/clangd/XRefsTests.cpp
1185

hmm, it looks like the "foo" labels on the ranges don't need to be there, and they hurt readability.

Want to remove them from all the tests, rather than add them to the method call test where they're missing?

This revision is now accepted and ready to land.Oct 4 2018, 2:48 AM
hokein updated this revision to Diff 168248.Oct 4 2018, 2:56 AM
hokein marked an inline comment as done.

Remove unnecessary labels.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.