From 9bc9bcc2472373ab81a2106e5a04fc6037e19fcc Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Thu, 16 Feb 2012 16:34:54 +0000 Subject: Format string analysis: give 'q' its own enumerator. This is in preparation for being able to warn about 'q' and other non-standard format string features. It also allows us to print its name correctly. llvm-svn: 150697 --- clang/test/Sema/format-strings-scanf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/test/Sema/format-strings-scanf.c') diff --git a/clang/test/Sema/format-strings-scanf.c b/clang/test/Sema/format-strings-scanf.c index c97da3fd921..e94af5acb11 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 +} -- cgit v1.2.3