[clangd] Collecting main file macro expansion locations in ParsedAST.
authorJohan Vikstrom <jvikstrom@google.com>
Fri, 30 Aug 2019 09:33:27 +0000 (09:33 +0000)
committerJohan Vikstrom <jvikstrom@google.com>
Fri, 30 Aug 2019 09:33:27 +0000 (09:33 +0000)
commit84b4c4a495f88fc91783e18c0cea9ee381c5266a
treee23b6204484a990fd89c2d758ec0d45e9a44b206
parentb22804b35464049ca92107d45042d2a5bbd292f6
[clangd] Collecting main file macro expansion locations in ParsedAST.

Summary: TokenBuffer does not collect macro expansions inside macro arguments which is needed for semantic higlighting. Therefore collects macro expansions in the main file in a PPCallback when building the ParsedAST instead.

Reviewers: hokein, ilya-biryukov

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

Tags: #clang

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

llvm-svn: 370452
clang-tools-extra/clangd/ClangdUnit.cpp
clang-tools-extra/clangd/ClangdUnit.h
clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp