[libcxx-commits] [clang] [compiler-rt] [libcxxabi] [llvm] Automatic removal of unused standard header (PR #192800)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 20 06:11:20 PDT 2026


serge-sans-paille wrote:

hey folks,
first, sorry for dropping this in the face of so many people. The downside of automatic review assignment, I guess.

As of why diskharzan exists, we tried to deploy clang-include-cleaner and iwyu in the context of firefox codebase, but we have a lot (*a lot*) of different configurations, leading to various preprocessor guards, and so the status of whether a file is needed or not depends on the configuration, which is fixable but requires a lot of work.
So we came up with an approximated but fast approach that removed many unusued headers, independently from the actual configuration, and that's what `diskarzhan` does. It's basically very fast and independent from the build configuration, at the expense of only working for standard headers and having some false negative.

@bolshakov-a I'll make sure to  look at the database from iwyu, that will avoid duplicating effort.


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


More information about the libcxx-commits mailing list