diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.h b/clang-tools-extra/clangd/index/CanonicalIncludes.h --- a/clang-tools-extra/clangd/index/CanonicalIncludes.h +++ b/clang-tools-extra/clangd/index/CanonicalIncludes.h @@ -71,6 +71,21 @@ /// /// Currently it only supports IWYU private pragma: /// https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-private +/// +/// We ignore other pragmas: +/// - keep: this is common but irrelevant: we do not currently remove includes +/// - export: this is common and potentially interesting, there are three cases: +/// * Points to a public header (common): we can suppress include2 if you +/// already have include1. Only marginally useful. +/// * Points to a private header annotated with `private` (somewhat commmon): +/// Not incrementally useful as we support private. +/// * Points to a private header without pragmas (rare). This is a reversed +/// private pragma, and is valuable but too rare to be worthwhile. +/// - no_include: this is about as common as private, but only affects the +/// current file, so the value is smaller. We could add support. +/// - friend: this is less common than private, has implementation difficulties, +/// and affects behavior in a limited scope. +/// - associated: extremely rare std::unique_ptr collectIWYUHeaderMaps(CanonicalIncludes *Includes);