From: Hans Wennborg Date: Sun, 7 Sep 2014 04:03:21 +0000 (+0000) Subject: Try to green test/Sema/format-strings.c on Win bots X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4deb99278de0ca315c7c177759fcfe7861046042;p=clang Try to green test/Sema/format-strings.c on Win bots git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217327 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/format-strings-gnu.c b/test/Sema/format-strings-gnu.c index f4910856b0..fc524e93ed 100644 --- a/test/Sema/format-strings-gnu.c +++ b/test/Sema/format-strings-gnu.c @@ -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() { diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index e31644a987..0d827e400d 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -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}}