[clangd] Improve goToDefinition on auto and dectype
authorQuentin Chateau <quentin.chateau@gmail.com>
Tue, 15 Dec 2020 15:31:25 +0000 (16:31 +0100)
committerSam McCall <sam.mccall@gmail.com>
Tue, 15 Dec 2020 15:32:22 +0000 (16:32 +0100)
commitbda7d0af970718c243d93b22a8449c20156e574f
tree07b4dbce1d4a8cc30c7ad841fd6d214564893d11
parentebef92169ca5a50fb8aeec08f35ccb919311acc1
[clangd] Improve goToDefinition on auto and dectype

locateSymbolAt (used in goToDeclaration) follows the
deduced type instead of failing to locate the declaration.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D92977
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/ASTTests.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp