[clangd] Prefer location from codegen files when merging symbols.

Summary:
For example, if an index symbol has location in a .proto file and an AST symbol
has location in a generated .proto.h file, then we prefer location in .proto
which is more meaningful to users.

Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def.

Reviewers: sammccall

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

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353708 91177308-0d34-0410-b5e6-96231b3b80d8
4 files changed