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().
Paths
| Differential D95852
[clangd] Report xref for base methods. ClosedPublic Authored by usaxena95 on Feb 2 2021, 12:06 AM.
Details
Summary 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:
Diff Detail
Event Timeline
Comment Actions Thanks!
This revision is now accepted and ready to land.Feb 3 2021, 2:38 AM This revision was landed with ongoing or failed builds.Feb 3 2021, 3:08 AM Closed by commit rG54afcade3bbc: [clangd] Report xref for base methods. (authored by usaxena95). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 320695 clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp
|
The recursive will be infinite if we have a cycle, but I guess clang will never generate a broken AST like that.