voyager-jhk wrote:

> > It may help in this case: [#59263 
> > (comment)](https://github.com/llvm/llvm-project/issues/59263#issuecomment-3846708515)
> >  When you don't specify numbers but only file names. I have to admit that 
> > didn't dig enough into it on why other mechanisms don't work (like 
> > HeaderFilterRegex which should work..)
> 
> Thanks for the link. It might actually be best to first figure out why 
> `ExcludeHeaderFilterRegex` isn't working; if it were working, using line 
> filter without line numbers wouldn't make sense. As for general support for 
> line filter in the config, whether that makes sense seems to be up to the 
> clang-tidy maintainers. In the case of clangd, I don't currently see any 
> real-world development use cases for it. To me, line filter is a handy tool 
> for CI/CD, where we check only the modified code within a specific file.

Thanks for pointing this out. I looked into `ExcludeHeaderFilterRegex`.

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.

https://github.com/llvm/llvm-project/pull/202575
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to