diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-09-08 04:00:03 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-09-08 04:00:03 +0000 |
commit | bbb6bb4952b77e57b842b4d3096848123ae690e7 (patch) | |
tree | d818e14d06c2b7cc7f7b0164f31e6bb5f40c8388 /test/Sema/format-strings-scanf.c | |
parent | 7ac9ef1c82c779a5348ed11b3d10e01c58803b35 (diff) |
Format strings: %Ld isn't available on Darwin or Windows.
This seems to be a GNU libc extension; we offer a fixit to %lld on
these platforms.
<rdar://problem/11518237>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163452 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings-scanf.c')
-rw-r--r-- | test/Sema/format-strings-scanf.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/test/Sema/format-strings-scanf.c b/test/Sema/format-strings-scanf.c index 235ac11faa..be2adddc52 100644 --- a/test/Sema/format-strings-scanf.c +++ b/test/Sema/format-strings-scanf.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -triple i386-apple-darwin9 -Wformat-nonliteral %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral %s // Test that -Wformat=0 works: // RUN: %clang_cc1 -fsyntax-only -Werror -Wformat=0 %s @@ -113,16 +113,6 @@ void test_alloc_extension(char **sp, wchar_t **lsp, float *fp) { scanf("%m[abc]", fp); // expected-warning{{format specifies type 'char **' but the argument has type 'float *'}} } -void test_longlong(long long *x, unsigned long long *y) { - scanf("%Ld", y); // no-warning - scanf("%Lu", y); // no-warning - scanf("%Lx", y); // no-warning - scanf("%Ld", x); // no-warning - scanf("%Lu", x); // no-warning - scanf("%Lx", x); // no-warning - 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 |