summaryrefslogtreecommitdiff
path: root/test/SemaCXX/format-strings-0x.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit5e20cdd81c44a443562a09007668ffdf76c455af (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /test/SemaCXX/format-strings-0x.cpp
parentd5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff)
Notes
Diffstat (limited to 'test/SemaCXX/format-strings-0x.cpp')
-rw-r--r--test/SemaCXX/format-strings-0x.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/SemaCXX/format-strings-0x.cpp b/test/SemaCXX/format-strings-0x.cpp
index 7e41c7fdbf9d5..ad57b773e0a06 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);