summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/format-strings-scanf.c
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-09-08 04:00:03 +0000
committerJordan Rose <jordan_rose@apple.com>2012-09-08 04:00:03 +0000
commit92303592c32434e6f8d8f321d1e78fcfec7ac7a4 (patch)
tree58a39424ab94d8f625746509da24bb929ac1b420 /clang/test/Sema/format-strings-scanf.c
parent4d1458ed389922e934581f1a53f02c77a80eb32e (diff)
downloadbcm5719-llvm-92303592c32434e6f8d8f321d1e78fcfec7ac7a4.tar.gz
bcm5719-llvm-92303592c32434e6f8d8f321d1e78fcfec7ac7a4.zip
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> llvm-svn: 163452
Diffstat (limited to 'clang/test/Sema/format-strings-scanf.c')
-rw-r--r--clang/test/Sema/format-strings-scanf.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/test/Sema/format-strings-scanf.c b/clang/test/Sema/format-strings-scanf.c
index 235ac11faa1..be2adddc52b 100644
--- a/clang/test/Sema/format-strings-scanf.c
+++ b/clang/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
OpenPOWER on IntegriCloud