summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/format-strings-0x.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /test/SemaCXX/format-strings-0x.cpp
parent38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff)
downloadFreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip
FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
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 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);
OpenPOWER on IntegriCloud