[clangd] Include refs of base method in refs for derived method.
authorUtkarsh Saxena <usx@google.com>
Mon, 4 Oct 2021 06:20:09 +0000 (08:20 +0200)
committerUtkarsh Saxena <usx@google.com>
Tue, 5 Oct 2021 15:39:49 +0000 (17:39 +0200)
commit6831c1d8689bebe745aac1fdd7354c2e2f692c1a
tree67b8ff86b93d4dbb24cf1e3eefbfa523f08b02c8
parent3081de8c72fc9b6c0cc8b1bb5f02858b78ebaa4c
[clangd] Include refs of base method in refs for derived method.

Addresses https://github.com/clangd/clangd/issues/881

Includes refs of base class method in refs of derived class method.
Previously we reported base class method's refs only for decl of derived
class method. Ideally this should work for all usages of derived class method.

Related patch:
https://github.com/llvm/llvm-project/commit/fbeff2ec2bc6e44b92931207b0063f83ff7a3b3a.

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