[clangd] Heuristically resolve dependent method calls
authorNathan Ridge <zeratul976@hotmail.com>
Thu, 5 Dec 2019 23:29:32 +0000 (18:29 -0500)
committerNathan Ridge <zeratul976@hotmail.com>
Thu, 12 Dec 2019 22:18:00 +0000 (17:18 -0500)
commitecaa9363303e811a051ebb6199e35e43319a699c
treeb948fbcd68d65769af9c1f17abbe4d2190f2d70e
parentc6b8c3d5d9a37b24bffa0bfc085a81f041bedc18
[clangd] Heuristically resolve dependent method calls

Summary:
The heuristic is to look in the definition of the primary template,
which is what you want in the vast majority of cases.

Fixes https://github.com/clangd/clangd/issues/141

Reviewers: sammccall

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

Tags: #clang

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