blob: 45d10a763ac154205a9126b83b911a92513b3cf2 [file] [log] [blame]
Ted Kremenek826d5b42011-07-14 06:49:52 +00001// RUN: %clang_cc1 -triple i386-apple-macosx10.7.0 -fsyntax-only -verify -Wformat-nonliteral %s
2
3int printf(const char *restrict, ...);
4
5// Test that 'long' is compatible with 'int' on 32-bit.
6typedef unsigned int UInt32;
7void test_rdar_9763999() {
8 UInt32 x = 7;
9 printf("x = %u\n", x); // no-warning
10}
11
12void test_positive() {
13 printf("%d", "hello"); // expected-warning {{conversion specifies type 'int' but the argument has type 'char *'}}
14}
15