blob: 0830951acc8927595fbecb78ca6ccd88479d0ac3 [file] [log] [blame]
Daniel Dunbar8bf0ccd2009-07-25 12:47:38 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
Anders Carlsson8f031b32009-06-27 04:05:33 +00003#include <stdio.h>
4
5const char* f(const char *s) __attribute__((format_arg(1)));
6
7void g(const char *s) {
8 printf("%d", 123);
9 printf("%d %d", 123); // expected-warning{{more '%' conversions than data arguments}}
10
11 printf(f("%d"), 123);
12 printf(f("%d %d"), 123); // expected-warning{{more '%' conversions than data arguments}}
13}