diff options
author | Hans Wennborg <hans@hanshq.net> | 2011-12-09 12:22:12 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2011-12-09 12:22:12 +0000 |
commit | f4f0c6095d1f481b94c6821c65e3bf1c9df42af7 (patch) | |
tree | d2caaa2155d6ae3b1162d71d3d66b3c622babbc6 /test/Sema/format-strings-int-typedefs.c | |
parent | b8ec3e35d2d7a56b21cb449d4a7bde8d9d12c2a5 (diff) |
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
Diffstat (limited to 'test/Sema/format-strings-int-typedefs.c')
-rw-r--r-- | test/Sema/format-strings-int-typedefs.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |