[clangd] Add "member" symbols to the index
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 5 Jun 2018 14:01:40 +0000 (14:01 +0000)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 5 Jun 2018 14:01:40 +0000 (14:01 +0000)
commit945b5a3df03b0b941b99a1003ef168dca5d82c4c
treee645a4b8d7c62c2dff3d7ee2d429c870000cd7c6
parent1181f94ae43d3f257bf2d7ca3c2178cb8b305b37
[clangd] Add "member" symbols to the index

Summary:
This adds more symbols to the index:
- member variables and functions
- enum constants in scoped enums

The code completion behavior should remain intact but workspace symbols should
now provide much more useful symbols.
Other symbols should be considered such as the ones in "main files" (files not
being included) but this can be done separately as this introduces its fair
share of problems.

Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewers: ioeric, sammccall

Reviewed By: ioeric, sammccall

Subscribers: hokein, sammccall, jkorous, klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits

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

llvm-svn: 334017
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/CodeComplete.h
clang-tools-extra/clangd/index/Index.h
clang-tools-extra/clangd/index/MemIndex.cpp
clang-tools-extra/clangd/index/SymbolCollector.cpp
clang-tools-extra/clangd/index/SymbolCollector.h
clang-tools-extra/clangd/index/SymbolYAML.cpp
clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
clang-tools-extra/unittests/clangd/FileIndexTests.cpp
clang-tools-extra/unittests/clangd/FindSymbolsTests.cpp
clang-tools-extra/unittests/clangd/SymbolCollectorTests.cpp