[clangd] Factor out some helper functions related to heuristic resolution in TargetFinder
authorNathan Ridge <zeratul976@hotmail.com>
Wed, 8 Jul 2020 06:43:38 +0000 (02:43 -0400)
committerNathan Ridge <zeratul976@hotmail.com>
Fri, 10 Jul 2020 05:58:34 +0000 (01:58 -0400)
commit98d763ad051f5eab89fa46167516fc8a84f471d0
tree3bfe20e88cad7dfb8a4a2ab78a5083aeea3dd208
parente71c7b593a2d1b7d60dc8aaa4b8ede03de7bbd00
[clangd] Factor out some helper functions related to heuristic resolution in TargetFinder

Summary:
Two helpers are introduced:

 * Some of the logic previously in TargetFinder::Visit*() methods is
   factored out into resolveDependentExprToDecls().

 * Some of the logic in getMembersReferencedViaDependentName() is
   factored out into resolveTypeToRecordDecl().

D82739 will build on this and use these functions in new ways.

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83371
clang-tools-extra/clangd/FindTarget.cpp