[clangd] Loose include-cleaner matching for verbatim headers
This updates clangd to take advantage of the APIs added in D155819. The main difficulties here are around path normalization. For layering and performance reasons Includes compares paths lexically, and so we should have consistent paths that can be compared across addSearchPath() and add(): symlinks resolved or not, relative or absolute. This patch spells out that requirement, for most tools consistent use of FileManager/HeaderSearch is enough. For clangd this does not work: IncludeStructure doesn't hold FileEntrys due to the preamble/main-file split. It records paths, but canonicalizes them first. We choose to use this canonical form as our common representation, so we have to canonicalize the directory entries too. This is done in preamble-build and recorded in IncludeStructure, as canonicalization is quite expensive. Differential Revision: https://reviews.llvm.org/D155878
parent
e5f04830
Please register or sign in to comment