[clangd] Perform system include extraction inside CommandMangler
authorNathan Ridge <zeratul976@hotmail.com>
Mon, 12 Sep 2022 08:29:29 +0000 (04:29 -0400)
committerNathan Ridge <zeratul976@hotmail.com>
Mon, 7 Nov 2022 22:58:39 +0000 (17:58 -0500)
commit68e230aa29f71ed840a0ea9c0be97c8c6ead1c69
tree9a5bfa4052e632330d70fc8a433f577e35751692
parentafa22c563f12f22da93b8f172d18c7991392d071
[clangd] Perform system include extraction inside CommandMangler

It needs to run after edits from config files are applied to
the compile command (because the config file may specify the
compiler), and before resolveDriver() runs at the end of
CommandMangler.

As part of this change, QueryDriverDatabase is renamed to
SystemIncludeExtractor and is no longer a GlobalCompilationDatabase.

Fixes https://github.com/clangd/clangd/issues/1089
Fixes https://github.com/clangd/clangd/issues/1173
Fixes https://github.com/clangd/clangd/issues/1263

Differential Revision: https://reviews.llvm.org/D133757
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/CompileCommands.cpp
clang-tools-extra/clangd/CompileCommands.h
clang-tools-extra/clangd/GlobalCompilationDatabase.h
clang-tools-extra/clangd/QueryDriverDatabase.cpp
clang-tools-extra/clangd/test/system-include-extractor.test
clang-tools-extra/clangd/tool/Check.cpp