On Feb 10, 2012, at 12:49 PM, David Blaikie <[email protected]> wrote:

> [oops, missed a warning suppression/validation for 'false' as a null
> pointer literal - I used an expected-warning, but I'm actually
> undecided about whether we should do that in general (ad expected
> warnings for warnings we aren't trying to test) rather than just
> disable that warning in this test case (or, indeed, disable all
> warnings except the ones we plan to test in a given test case - though
> that might lose us a lot of fairly useful (if scattershot) accidental
> coverage)]

Sometimes I like having extra warnings there that cross-check that the checking 
isn't completely broken.  That way you can distinguish between a warning not 
firing because it's not meant to fire and warning not firing because things are 
completely broken (e.g., the test is wrong).

For this part of the test:

+++ b/test/SemaCXX/format-strings-0x.cpp
@@ -10,4 +10,5 @@ void f(char **sp, float *fp) {
 
   printf("%a", 1.0);
   scanf("%afoobar", fp);
+  printf(nullptr);
 }
diff --git

Let's add a case where the warning actually fires so that we validate that it 
isn't completely broken in this test file.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to