From f4f0c6095d1f481b94c6821c65e3bf1c9df42af7 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 9 Dec 2011 12:22:12 +0000 Subject: Make printf warnings refer to wint_t and wchar_t by name in addition to underlying type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146254 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/format-strings-int-typedefs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/Sema/format-strings-int-typedefs.c') diff --git a/test/Sema/format-strings-int-typedefs.c b/test/Sema/format-strings-int-typedefs.c index 29565e69ad..2568b8d69f 100644 --- a/test/Sema/format-strings-int-typedefs.c +++ b/test/Sema/format-strings-int-typedefs.c @@ -7,6 +7,11 @@ void test(void) { printf("%ju", 42.0); // expected-warning {{conversion specifies type 'uintmax_t' (aka 'unsigned long long')}} printf("%zu", 42.0); // expected-warning {{conversion specifies type 'size_t' (aka 'unsigned long')}} printf("%td", 42.0); // expected-warning {{conversion specifies type 'ptrdiff_t' (aka 'int')}} + printf("%lc", 42.0); // expected-warning {{conversion specifies type 'wint_t' (aka 'int')}} + printf("%ls", 42.0); // expected-warning {{conversion specifies type 'wchar_t *' (aka 'int *')}} + printf("%S", 42.0); // expected-warning {{conversion specifies type 'wchar_t *' (aka 'int *')}} + printf("%C", 42.0); // expected-warning {{conversion specifies type 'wchar_t' (aka 'int')}} + // typedef size_t et al. to something crazy. typedef void *size_t; -- cgit v1.2.3-18-g5258