[clangd] Simplify auto hover
authorIlya Biryukov <ibiryukov@google.com>
Wed, 24 Oct 2018 10:09:34 +0000 (10:09 +0000)
committerIlya Biryukov <ibiryukov@google.com>
Wed, 24 Oct 2018 10:09:34 +0000 (10:09 +0000)
commit5a74a9cf5f9eb012d97075e3d85f7a8698a97a3e
treedc0c0f33265e73490a32b6462598397f382d4ad4
parente6f7b0b5580435cd8bb545b1f34516337f944e10
[clangd] Simplify auto hover

Summary:
Use helper from clang. Also fixes some weird corner cases, e.g.
    auto (*foo)() = bar;

Reviewers: kadircet, hokein

Reviewed By: kadircet, hokein

Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits

Differential Revision: https://reviews.llvm.org/D53347

llvm-svn: 345128
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/unittests/clangd/XRefsTests.cpp