[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 24 10:02:14 PST 2024
https://github.com/sam-mccall commented:
Sorry about inactivity on my part (here and in general). Thanks for working on this, and thanks @HighCommander4 as always - will leave LGTM to you.
Landing this without include-cleaner support is OK with me, though a bit sad.
I'm not sure I see the difficulty though:
IncludeCleaner.cpp has `generateMissingIncludeDiagnostics()` which already takes the IgnoreHeaders filter, and decides whether to spell with angles or quotes based on the include-cleaner library's suggested spelling (`Angled`). Can we just override that based on the QuotedHeaders etc filters?
That wouldn't validate whether the include can actually be included with the flipped quoting style, but it almost always is, and ISTM the other paths also don't validate this.
It's sad that there's not a single codepath that would handle all these, but maybe the perfect is the enemy of the good here.
https://github.com/llvm/llvm-project/pull/67749
More information about the cfe-commits
mailing list