diff options
Diffstat (limited to 'test/SemaCXX/format-strings-0x.cpp')
-rw-r--r-- | test/SemaCXX/format-strings-0x.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/format-strings-0x.cpp b/test/SemaCXX/format-strings-0x.cpp index 7e41c7f..ad57b77 100644 --- a/test/SemaCXX/format-strings-0x.cpp +++ b/test/SemaCXX/format-strings-0x.cpp @@ -8,6 +8,9 @@ extern int printf(const char *restrict, ...); void f(char **sp, float *fp) { scanf("%as", sp); // expected-warning{{format specifies type 'float *' but the argument has type 'char **'}} + printf("%p", sp); // expected-warning{{format specifies type 'void *' but the argument has type 'char **'}} + scanf("%p", sp); // expected-warning{{format specifies type 'void **' but the argument has type 'char **'}} + printf("%a", 1.0); scanf("%afoobar", fp); printf(nullptr); |