[libc-commits] [PATCH] D112720: [clang-tidy] Use globs in HeaderFilter

Carlos Galvez via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Oct 28 08:07:52 PDT 2021

carlosgalvezp added a comment.

In D112720#3093636 <https://reviews.llvm.org/D112720#3093636>, @lebedev.ri wrote:

> Not in favor of general directions like this.
> Does it not break the existing uses (existing `.clang-tidy`'s e.g.)

Yep, it's a breaking change. The purpose of this patch is mostly to show how it would look like and see if that would be the desired result. There's 2 aspects of it:

- Rename of `HeaderFilterRegex` to `HeaderFilter`, to be consistent with `--header-filter`. If this is too much breakage, I'm OK with reverting.
- Replace regex with globs. Won't break the use of `.*`. It will break for the use case of having a parent `.clang-tidy` with `.*` and a child `.clang-tidy` with `my_folder/*\.h`. I personally always found the current interface confusing as a user. What regex should I write? Should I consider full paths, relative paths, does it matter?

I suppose I can keep the exact same behavior as master, but that will add additional tweaks and complexity to the `GlobList` class.



More information about the libc-commits mailing list