xref: /aosp_15_r20/external/clang/test/Sema/no-format-y2k-turnsoff-format.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -verify -fsyntax-only -Wformat -Wno-format-y2k %s
2*67e74705SXin Li // rdar://9504680
3*67e74705SXin Li 
4*67e74705SXin Li void foo(const char *, ...) __attribute__((__format__ (__printf__, 1, 2)));
5*67e74705SXin Li 
bar(unsigned int a)6*67e74705SXin Li void bar(unsigned int a) {
7*67e74705SXin Li         foo("%s", a); // expected-warning {{format specifies type 'char *' but the argument has type 'unsigned int'}}
8*67e74705SXin Li }
9*67e74705SXin Li 
10