justincady wrote:

> I wonder what is the target scenario for this feature.

This PR addresses clang-tidy's lack of ability to ignore some set of headers 
when analyzing a file (most commonly third party code that cannot be modified).

>  I remember regex can excluding some pattern, the we can exclude header file 
> in `HeaderFilterRegex`.

The underlying regex implementation for `HeaderFilterRegex` is `llvm::Regex` 
which does not support negative lookahead. See:

- https://reviews.llvm.org/D34654
- https://lists.llvm.org/pipermail/cfe-dev/2015-November/046203.html
- https://github.com/llvm/llvm-project/issues/25590

As I mentioned in the description, one option to allow exclusion of headers 
would be migrating to `std::regex`. But I think that has the potential to break 
existing configs, which is why reviving/reimplementing D34654 seems like the 
best path forward to me.

https://github.com/llvm/llvm-project/pull/91400
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to