2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-07-25 20:47:38 +08:00
|
|
|
|
2009-11-17 16:57:36 +08:00
|
|
|
int printf(const char *, ...);
|
2009-06-27 12:05:33 +08:00
|
|
|
|
|
|
|
const char* f(const char *s) __attribute__((format_arg(1)));
|
|
|
|
|
|
|
|
void g(const char *s) {
|
|
|
|
printf("%d", 123);
|
|
|
|
printf("%d %d", 123); // expected-warning{{more '%' conversions than data arguments}}
|
|
|
|
|
|
|
|
printf(f("%d"), 123);
|
|
|
|
printf(f("%d %d"), 123); // expected-warning{{more '%' conversions than data arguments}}
|
|
|
|
}
|