aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/format-strings-scanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/format-strings-scanf.c')
-rw-r--r--clang/test/Sema/format-strings-scanf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/format-strings-scanf.c b/clang/test/Sema/format-strings-scanf.c
index c97da3f..e94af5a 100644
--- a/clang/test/Sema/format-strings-scanf.c
+++ b/clang/test/Sema/format-strings-scanf.c
@@ -117,3 +117,7 @@ void test_longlong(long long *x, unsigned long long *y) {
scanf("%Ls", "hello"); // expected-warning {{length modifier 'L' results in undefined behavior or no effect with 's' conversion specifier}}
}
+void test_quad(int *x, long long *llx) {
+ scanf("%qd", x); // expected-warning{{format specifies type 'long long *' but the argument has type 'int *'}}
+ scanf("%qd", llx); // no-warning
+}