]> granicus.if.org Git - clang/commitdiff
Try to green test/Sema/format-strings.c on Win bots
authorHans Wennborg <hans@hanshq.net>
Sun, 7 Sep 2014 04:03:21 +0000 (04:03 +0000)
committerHans Wennborg <hans@hanshq.net>
Sun, 7 Sep 2014 04:03:21 +0000 (04:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217327 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/format-strings-gnu.c
test/Sema/format-strings.c

index f4910856b00f8ae363b9316ba9f6ddca12934f4d..fc524e93ed48b69ddefc4ba402e36d94802b8fea 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -fsyntax-only -verify -triple i386-apple-darwin9 %s
 // RUN: %clang_cc1 -fsyntax-only -verify -triple thumbv6-apple-ios4.0 %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-mingw32 %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-pc-win32 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-mingw32 -DMS %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-pc-win32 -DMS %s
 
 // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu -DALLOWED %s
 // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-freebsd -DALLOWED %s
@@ -23,6 +23,10 @@ void test() {
   // expected-warning@-6 {{length modifier 'L' results in undefined behavior or no effect with 'd' conversion specifier}}
   // expected-note@-7 {{did you mean to use 'll'?}}
 #endif
+
+#ifndef MS
+  printf("%Z\n", quiteLong); // expected-warning{{invalid conversion specifier 'Z'}}
+#endif
 }
 
 void testAlwaysInvalid() {
index e31644a987560a271ebcb3fbf1ccdc9161d073ab..0d827e400d7e12d4987aecc8f6a5fc5925a2f98c 100644 (file)
@@ -217,7 +217,7 @@ void test10(int x, float f, int i, long long lli) {
   printf("%**\n"); // expected-warning{{invalid conversion specifier '*'}}
   printf("%d%d\n", x); // expected-warning{{more '%' conversions than data arguments}}
   printf("%d\n", x, x); // expected-warning{{data argument not used by format string}}
-  printf("%W%d%Z\n", x, x, x); // expected-warning{{invalid conversion specifier 'W'}} expected-warning{{invalid conversion specifier 'Z'}}
+  printf("%W%d\n", x, x); // expected-warning{{invalid conversion specifier 'W'}}
   printf("%"); // expected-warning{{incomplete format specifier}}
   printf("%.d", x); // no-warning
   printf("%.", x);  // expected-warning{{incomplete format specifier}}