r217327 - Try to green test/Sema/format-strings.c on Win bots

Hans Wennborg hans at hanshq.net
Sat Sep 6 21:03:22 PDT 2014


Author: hans
Date: Sat Sep  6 23:03:21 2014
New Revision: 217327

URL: http://llvm.org/viewvc/llvm-project?rev=217327&view=rev
Log:
Try to green test/Sema/format-strings.c on Win bots

Modified:
    cfe/trunk/test/Sema/format-strings-gnu.c
    cfe/trunk/test/Sema/format-strings.c

Modified: cfe/trunk/test/Sema/format-strings-gnu.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings-gnu.c?rev=217327&r1=217326&r2=217327&view=diff
==============================================================================
--- cfe/trunk/test/Sema/format-strings-gnu.c (original)
+++ cfe/trunk/test/Sema/format-strings-gnu.c Sat Sep  6 23:03:21 2014
@@ -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 at -6 {{length modifier 'L' results in undefined behavior or no effect with 'd' conversion specifier}}
   // expected-note at -7 {{did you mean to use 'll'?}}
 #endif
+
+#ifndef MS
+  printf("%Z\n", quiteLong); // expected-warning{{invalid conversion specifier 'Z'}}
+#endif
 }
 
 void testAlwaysInvalid() {

Modified: cfe/trunk/test/Sema/format-strings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings.c?rev=217327&r1=217326&r2=217327&view=diff
==============================================================================
--- cfe/trunk/test/Sema/format-strings.c (original)
+++ cfe/trunk/test/Sema/format-strings.c Sat Sep  6 23:03:21 2014
@@ -217,7 +217,7 @@ void test10(int x, float f, int i, long
   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}}





More information about the cfe-commits mailing list