<div dir="ltr">Hi all,<div><br></div><div>I wanted to gauge interest in a patch that would allow clang-tidy's -header-filter option to accept std::regex expressions instead of its current support of only the llvm::Regex.  I've been using this in a local build of clang-tidy recently and have a patch ready to submit if people are interested.</div><div><br></div><div><b>Pros:</b></div><div>    This would allow negative lookahead in -header-filter regular expressions (something llvm::Regex doesn't support).  For example, I've been working in a large repository with lots of subdirs/submodules, including a ThirdPartyLibs subdir where we check in SHAs of all third party, open source code we are using.  It's nice to be able to pass the negative lookahead regex:</div><div><br></div><div>^(?!.*ThirdPartyLibs.*).*$</div><div><br></div><div>and filter out all third party headers when running clang-tidy.</div><div>    Other command line options (files, -checks, maybe others) accept glob filters, which allow for negation, and this comes in handy.  I think we should be consistent in allowing negation of some form in all filter options. I can try to re-implement this with a glob filter if that's preferable.</div><div><br></div><div><b>Cons:</b></div><div><b>    </b>Some compilers may not support std::regex.  I'm not sure when that was introduced in various compilers, or if clang still supports building on those compilers. Any other drawbacks I'm not thinking off?</div><div><br></div><div>Let me know what you all think!</div><div>- Sam Baxter</div></div>