[PATCH] Allow regexes in all verifier directives: drop the expected-(error|warning|note)-re, variants

Richard Smith richard at metafoo.co.uk
Thu Dec 12 15:08:10 PST 2013


On Thu, Dec 12, 2013 at 1:52 PM, Hans Wennborg <hans at chromium.org> wrote:

> On Thu, Dec 12, 2013 at 11:38 AM, Alp Toker <alp at nuanti.com> wrote:
> > Reading through SVN history shows that over years any syntax that isn't
> > shored up tends to break.
>
> Yes, I agree we might have relaxed these tests a bit too much.
>
> >> Requiring -re on directives with regexes makes them easier to grep
> >> for, but I don't know how important that is.
> >
> > Looking at the changes today, I'm starting to think anything to make
> regex
> > expressions stand out is a good idea.
>
> I think they do stand out a bit already with the extra {{'s, but sure,
> explicitly putting -re on the directives makes them stand out even
> more.
>
> Anyway, I'm curious to hear what Richard thinks here.


OK, easy things first: if this is the direction we want, the patch looks
good. The [{]... stuff is ugly, but doesn't seem unacceptably so,
especially when we have only two affected expect directives in the entire
testsuite.

More difficult question: do we want this change? I agree with Alp that the
proliferation of overly-broad -re checks is a bad thing, but that seems
like a separate issue to me -- I don't think changing the syntax from -re
to {{...}} really makes it any easier or harder to write these checks. For
me the most interesting argument against this change is that right now it's
easy to find the tests that use a regexp, and the most interesting
arguments for the change are that they make -verify's interface simpler and
more similar to FileCheck. I find the latter to be a stronger argument.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131212/ea9f721a/attachment.html>


More information about the cfe-commits mailing list