[clang-tools-extra] [clang-tidy] Support LineFilter in .clang-tidy configuration files (PR #202575)

Aleksandr Platonov via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 9 21:05:26 PDT 2026


ArcsinX wrote:

> In standalone clang-tidy, `HeaderFilterRegex`/`ExcludeHeaderFilterRegex` are applied by `ClangTidyDiagnosticConsumer::checkFilters()`. clangd does not use `ClangTidyDiagnosticConsumer` directly, and I do not see equivalent handling for these filters in its diagnostic path. So while ExcludeHeaderFilterRegex may be the more natural mechanism for excluding header diagnostics, it is not currently handled by clangd.

It might be better to support `HeaderFilterRegex`/`ExcludeHeaderFilterRegex` in clangd, rather than adding `LineFilter` into the clang-tidy configuration and then having to add additional support for `LineFilter` in clangd anyway.

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


More information about the cfe-commits mailing list