Thanks! Committed in r160966 with the extra test you suggested.

 - Hans

On Mon, Jul 30, 2012 at 5:46 PM, Jordan Rose <[email protected]> wrote:
> Looks good to me. I'd add this second case to test_writeback as well, to make 
> sure that we don't regress on the "keep going" for scanf.
>
> void test_writeback(int *x) {
>   scanf("%n", (void*)0); // expected-warning{{format specifies type 'int *' 
> but the argument has type 'void *'}}
>   scanf("%n %c", x, x); // expected-warning{{format specifies type 'char *' 
> but the argument has type 'int *'}}
> }
>
> Thanks, Hans!
>
> On Jul 30, 2012, at 2:00 AM, Hans Wennborg <[email protected]> wrote:
>
>> Hi all,
>>
>> The attached patch makes Clang check that the corresponding argument
>> for "%n" in a format string is int*.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to