On Feb 21, 2012, at 10:32 AM, Jean-Daniel Dupas <[email protected]> wrote:
> Thanks,
>
> What do you mean by "the right thing".
>
> In the C test, the function check_string_literal2() test that the warning
> does not trigger when the user forward a format string argument.
>
> In the C++ test, the "int Foo::printf(const char *fmt, …)" contains a case
> with vprintf() and no warning, and finally, the objc test case contains a
> similar test (+ [Bar log2:(NSString *)fmt] ) with NSLogv().
>
Those are great tests. I was just talking about the obvious case. Here your
patch introduces the following test change:
- vprintf(s,ap); // // no-warning
+ vprintf(s,ap); // expected-warning {{format string is not a string literal}}
I'm just asking for a test case that shows vprintf being called with a string
literal and the warning not firing, etc. Yes I know this should work, but our
tests should reflect that. I did another scan of our tests, and it looks like
we have such a test case. So I think this patch is good as is._______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits