diff options
author | Hans Wennborg <hans@hanshq.net> | 2012-02-16 16:34:54 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2012-02-16 16:34:54 +0000 |
commit | 32addd519c6699000ff79c387a1c87f0ab7c3698 (patch) | |
tree | 310f61f2bf177db587fe8452e88c2c12d2740b5d /test/Sema/format-strings-scanf.c | |
parent | d1ac03ebac3ab5a8456b955e3f8634f786843f9a (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings-scanf.c')
-rw-r--r-- | test/Sema/format-strings-scanf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/format-strings-scanf.c b/test/Sema/format-strings-scanf.c index c97da3fd92..e94af5acb1 100644 --- a/test/Sema/format-strings-scanf.c +++ b/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 +} |