[clangd] Collect refs from headers.
authorHaojian Wu <hokein@google.com>
Wed, 17 Oct 2018 08:38:36 +0000 (08:38 +0000)
committerHaojian Wu <hokein@google.com>
Wed, 17 Oct 2018 08:38:36 +0000 (08:38 +0000)
commit7dd4950ea52bdc9f295ea2fcbe7328a018b7dd98
tree74beb1c85f7ed0a7623b27981c8fd80bc5d80e57
parent1a213a42d6f312428427a56e5f7761f2408b9c6a
[clangd] Collect refs from headers.

Summary:
Add a flag to SymbolCollector to collect refs fdrom headers.

Note that we collect refs from headers in static index, and we don't do it for
dynamic index because of the preamble (we skip function body in preamble,
collecting it will result incomplete results).

Reviewers: sammccall

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

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

llvm-svn: 344678
clang-tools-extra/clangd/index/IndexAction.cpp
clang-tools-extra/clangd/index/IndexAction.h
clang-tools-extra/clangd/index/SymbolCollector.cpp
clang-tools-extra/clangd/index/SymbolCollector.h
clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp