1 // RUN: %clang_cc1 -triple x86_64-apple-darwin9.0 -fsyntax-only -verify -Wno-format -Wformat-type-confusion %s
3 __attribute__((format(__printf__
, 1, 2)))
4 int printf(const char *msg
, ...);
6 #define FMT "%hd %hu %d %u %hhd %hhu %c"
11 b
, // expected-warning {{format specifies type 'short' but the argument has type '_Bool'}}
12 b
, // expected-warning {{format specifies type 'unsigned short' but the argument has type '_Bool'}}
17 uc
, // expected-warning {{format specifies type 'short' but the argument has type 'unsigned char'}}
18 uc
, // expected-warning {{format specifies type 'unsigned short' but the argument has type 'unsigned char'}}
23 sc
, // expected-warning {{format specifies type 'short' but the argument has type 'signed char'}}
24 sc
, // expected-warning {{format specifies type 'unsigned short' but the argument has type 'signed char'}}