[clangd] Proof-of-concept query iterators for Dex symbol index
authorKirill Bobyrev <kbobyrev.opensource@gmail.com>
Thu, 26 Jul 2018 10:42:31 +0000 (10:42 +0000)
committerKirill Bobyrev <kbobyrev.opensource@gmail.com>
Thu, 26 Jul 2018 10:42:31 +0000 (10:42 +0000)
commitbea258d3d7ce297807671d493619065a68366347
tree97f786bbd88aec553d3db986028932d93fcc1250
parent1387159b93c8ea8d386b09c97effe5ad889f187a
[clangd] Proof-of-concept query iterators for Dex symbol index

This patch introduces three essential types of query iterators:
`DocumentIterator`, `AndIterator`, `OrIterator`. It provides a
convenient API for query tree generation and serves as a building block
for the next generation symbol index - Dex. Currently, many
optimizations are missed to improve code readability and to serve as the
reference implementation. Potential improvements are briefly mentioned
in `FIXME`s and will be addressed in the following patches.

Dex RFC in the mailing list:
http://lists.llvm.org/pipermail/clangd-dev/2018-July/000022.html

Iterators, their applications and potential extensions are explained in
detail in the design proposal:
https://docs.google.com/document/d/1C-A6PGT6TynyaX4PXyExNMiGmJ2jL1UwV91Kyx11gOI/edit#heading=h.903u1zon9nkj

Reviewers: ioeric, sammccall, ilya-biryukov

Subscribers: cfe-commits, klimek, jfb, mgrang, mgorny, MaskRay, jkorous,
arphaman

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

llvm-svn: 338017
clang-tools-extra/clangd/CMakeLists.txt
clang-tools-extra/clangd/index/dex/Iterator.cpp [new file with mode: 0644]
clang-tools-extra/clangd/index/dex/Iterator.h [new file with mode: 0644]
clang-tools-extra/unittests/clangd/DexIndexTests.cpp