[clangd] Collect macros in the preamble region of the main file
authorHaojian Wu <hokein@google.com>
Tue, 24 Sep 2019 11:14:06 +0000 (11:14 +0000)
committerHaojian Wu <hokein@google.com>
Tue, 24 Sep 2019 11:14:06 +0000 (11:14 +0000)
commit7e3c74bc63f97dd8fa354e6f2153ab8b3d88082a
tree1df37fa5f202189bd8b4a3cf4498f18e6fb79c56
parent6bac09afe89f7db8e6d4951d66d127d048c91dab
[clangd] Collect macros in the preamble region of the main file

Summary:
- store all macro references in the ParsedAST;
- unify the two variants of CollectMainFileMacros;

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 372725
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/CollectMacros.h [new file with mode: 0644]
clang-tools-extra/clangd/ParsedAST.cpp
clang-tools-extra/clangd/ParsedAST.h
clang-tools-extra/clangd/Preamble.cpp
clang-tools-extra/clangd/Preamble.h
clang-tools-extra/clangd/SemanticHighlighting.cpp
clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp