[cfe-commits] r164677 -

David Blaikie dblaikie at gmail.com
Sun Sep 30 07:47:35 PDT 2012


Any particular reason you prefer this (adding a new expect feature)
over just using -Werror (without -verify at all) for tests that are
intended not to produce any diagnostics?

I don't mind really, just seems like unnecessary work to me & I'm
wondering if I'm missing something
From: Andy Gibbs
Sent: 9/29/2012 5:25 PM
To: Jordan Rose; Sean Silva
Cc: Nico Weber; Richard Smith; cfe-commits at cs.uiuc.edu
Subject: Re: [cfe-commits] r164677 -
On Friday, September 28, 2012 10:03 PM, Jordan Rose wrote:
> On Sep 28, 2012, at 12:09 , Sean Silva <silvas at purdue.edu> wrote:
>
>>> Yes, that's a great point. We could add some kind of
>>> expected-no-diagnostics
>>> marker (or -verify-no-diagnostic switch), or to change the test to use,
>>> say, -Werror instead of -verify (which would mean we'd no longer have
>>> caught the missing %s), but it certainly takes the shine off the idea.
>>
>> I think the expected-no-diagnostics is a good idea. It's good to have
>> the negative assertion described explicitly in the code, instead of
>> being just an "empty silence".
>>
>> Would introducing the expected-no-diagnostics + the "fail if no
>> expected-*" behavior solve the issue then?
>
> We have quite a few tests that currently use -verify to test that there
> are
> no errors. If we make this illegal, we'll have to spuriously introduce
> warnings, or add this new expected-no-diagnostics. I'm mildly against
> expected-no-diagnostics but I can't come up with a solid reason why. I
> thought the original proposal here was to have -verify warn if the input
> file had zero length, which I think would handle this issue fine.
>
> Roping in Andy in case he has any insights to share from his earlier
> -verify work.

I think my preference would be towards having an expected-no-diagnostics
marker and not creating a new -verify-no-diagnostic switch.  Simply making
the -verify feature so that it must find at least one expected-* directive
would be easy (generating an error if it doesn't), and then implementing
the new directive to check that no diagnostics were generated, would again
be straight forward.  This would mean adding "// expected-no-diagnostics"
into a number of test-cases, but would only add to their robustness, IMHO.

I can't immediately see a downside to this approach, and it would de-facto
catch the zero-length file problem, since it won't pick up any directives
and would therefore error.

I would be happy to throw together a patch once I'm back from my holiday
on Tuesday, if no-one else wants to do it.

Cheers,
Andy


_______________________________________________
cfe-commits mailing list
cfe-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list