[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Fri May 10 01:31:26 PDT 2024


kadircet wrote:

thanks for the patch! this definitely LGTM at high level.

as you folks also pointed out we don't want to surface analysis for angled includes in general, as include-cleaner doesn't have support for system headers yet (we wanted to have something similar to Stdlib includes, which maps certain include suffixes for known system libraries like posix, glibc to their umbrella headers, but never got to it).

As a result, turning this on unconditionally would yield a ton of false negatives, which renders analysis useless. But doing that behind a flag, especially in conjunction with `IgnoreHeaders` is a solution that works nicely in practice.

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


More information about the cfe-commits mailing list