[clangd] Improve XRefs support for ObjCMethodDecl
authorDavid Goldman <davg@google.com>
Tue, 19 Jul 2022 16:10:28 +0000 (12:10 -0400)
committerDavid Goldman <davg@google.com>
Tue, 26 Jul 2022 16:11:26 +0000 (12:11 -0400)
commit88a2ac6ad623cd7519070f6b0bf2de2793bb90dd
tree38b93040313288fcaf3f3da4514413e949082f51
parentbffec215abbd643ceac83e58caa244ded8cd837c
[clangd] Improve XRefs support for ObjCMethodDecl

- Correct nameLocation to point to the first selector fragment instead
  of the - or +

- getDefinition now searches through the proper impl decls to find
  the definition of the ObjCMethodDecl if one exists

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