[clangd] Use the index-based API to do the header-source switch.

Summary:
If the file heuristic fails, we try to use the index&AST to do the
header/source inference.

Reviewers: kadircet

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

Tags: #clang

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

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