[cfe-commits] r85450 - in /cfe/trunk/test/Sema: format-strings.c return.c

John Thompson John.Thompson.JTSoftware at gmail.com
Wed Oct 28 17:10:43 PDT 2009


Author: jtsoftware
Date: Wed Oct 28 19:10:42 2009
New Revision: 85450

URL: http://llvm.org/viewvc/llvm-project?rev=85450&view=rev
Log:
Fix some Window-isms to get these tests to pass on Windows.

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

Modified: cfe/trunk/test/Sema/format-strings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/format-strings.c?rev=85450&r1=85449&r2=85450&view=diff

==============================================================================
--- cfe/trunk/test/Sema/format-strings.c (original)
+++ cfe/trunk/test/Sema/format-strings.c Wed Oct 28 19:10:42 2009
@@ -8,6 +8,10 @@
 
 char * global_fmt;
 
+#if defined(_WIN32) || defined(_WIN64)
+extern int snprintf(char*, size_t, const char*, ...);
+#endif
+
 void check_string_literal( FILE* fp, const char* s, char *buf, ... ) {
 
   char * b;
@@ -83,7 +87,7 @@
   va_start(ap,b);
 
   printf(L"foo %d",2); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}}
-  vasprintf(&b,L"bar %d",ap); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}}
+  vsprintf(b,L"bar %d",ap); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}}
 }
 
 void check_asterisk_precision_width(int x) {

Modified: cfe/trunk/test/Sema/return.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/return.c?rev=85450&r1=85449&r2=85450&view=diff

==============================================================================
--- cfe/trunk/test/Sema/return.c (original)
+++ cfe/trunk/test/Sema/return.c Wed Oct 28 19:10:42 2009
@@ -203,7 +203,11 @@
   if (j)
     longjmp(test30_j, 1);
   else
+#if defined(_WIN32) || defined(_WIN64)
+    longjmp(test30_j, 2);
+#else
     _longjmp(test30_j, 1);
+#endif
 }
 
 typedef void test31_t(int status);





More information about the cfe-commits mailing list