[clangd] Report xref for base methods.
authorUtkarsh Saxena <usx@google.com>
Mon, 1 Feb 2021 20:17:53 +0000 (21:17 +0100)
committerUtkarsh Saxena <usx@google.com>
Wed, 3 Feb 2021 11:07:43 +0000 (12:07 +0100)
commit54afcade3bbcf4a085c8a8c3c22429921420e54d
tree33cdae59f49cfb03d12cbf67e1222c973285b2d3
parent5bc6e75386e71129d3cbdcae6486a244a5301d54
[clangd] Report xref for base methods.

See: https://github.com/clangd/clangd/issues/668

```
struct A { virtual void foo() = 0; };
struct B : A { void foo() override; };
```

Find refs on `B::foo()` will show:
- decls of `A::foo()` (new)
- decls of `B::foo()`
- refs to `A::foo()` (new)
- refs to `B::foo()`.

Differential Revision: https://reviews.llvm.org/D95852
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp