<div dir="ltr"><div>I asked about something similar to this a couple of months ago. I believe that the response was that one of the supported compilers did not currently have std::regex.</div><div><br></div><div>I believe that the timeframe was that after the 3.8 release the transition to using std::regex would be feasible.</div><div><br></div><div>Can anyone confirm this?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 20, 2015 at 11:41 AM, Samuel Baxter via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank" rel="noreferrer">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>