[clang-tools-extra] [clang-tidy] treat fragment includes as main-file parts (PR #180282)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 15 10:37:45 PST 2026


vbvictor wrote:

> @vbvictor — could you suggest an alternative reviewer for this change?

I don't know anyone that can review this code apart from already added people.
FYI, there is lack of review capacity in clangd https://discourse.llvm.org/t/help-needed-with-clangd-maintenance/89820. And from what I've seen non-trivial feature patches can take several month before final approval.

> I ran this on a small project of mine that includes TableGen-generated files, and with this patch misc-include-cleaner works great in that setup.

Could you describe more presice how it was before and how it is now so we can see real-world benefits.

> I believe it’s a key step toward making the check usable on LLVM itself.

`include-cleaner` generally doesn't aling with LLVM guidelines: https://llvm.org/docs/CodingStandards.html#include-as-little-as-possible.
Guidelines allows (or even encourages) to use forward declarations and transitive includes.
I can see the benefit of this tool only in removing unused includes.

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


More information about the cfe-commits mailing list