[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

kleines Filmröllchen via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 22 11:38:36 PST 2024


kleinesfilmroellchen wrote:

After some discussion, I would like to land the feature "partially" as-is without support for "include cleaner" header insertion. (Case 3 in @HighCommander4's elaboration above.) This is motivated by two factors:
- Having looked at a way of supporting all three insertion cases, it seems like some significant refactoring is required. The common code between the three cases is either upstream in Clang (`HeaderSearch`), which would probably be a *very* leaky and unclean abstraction. Or downstream in replacement generation (`HeaderIncludes`), where the relevant information to make the decision is no longer available. I'm honestly not excited about performing such a refactor, as I am not particularly familiar with the complex code base.
- The other cases seem to be more common in practice, and have already been very useful in my dogfooding with SerenityOS. Within our project this patch would already be appreciated as a great improvement over the status quo.
If maintainers agree, I'd like to have this merged before 18.

https://github.com/llvm/llvm-project/pull/67749


More information about the cfe-commits mailing list