[clangd] Record IWYU pragma keep in the IncludeStructure
authorKirill Bobyrev <kbobyrev@google.com>
Wed, 8 Dec 2021 14:55:39 +0000 (15:55 +0100)
committerKirill Bobyrev <kbobyrev@google.com>
Wed, 8 Dec 2021 14:55:50 +0000 (15:55 +0100)
commiteecfc73ae4b909dbf26bd2d85b8c6580927df9fc
tree80aba7a785e3c4e428541f31c7d192ab3b8be5b3
parent847710f7b77ea4e3cd43f62b5b7d920ac47405a5
[clangd] Record IWYU pragma keep in the IncludeStructure

This will allow the IncludeCleaner to suppress warnings on the lines with "IWYU
pragma: keep".

Clang APIs are not very convinient, so the code has to navigate around it.

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D114072
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/Headers.cpp
clang-tools-extra/clangd/Headers.h
clang-tools-extra/clangd/ParsedAST.cpp
clang-tools-extra/clangd/Preamble.cpp
clang-tools-extra/clangd/unittests/HeadersTests.cpp
clang-tools-extra/clangd/unittests/PreambleTests.cpp