summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2009-10-29 00:10:42 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2009-10-29 00:10:42 +0000
commite413e88f2ea75d30c2ecb9ac1bda9d7ea3b8853c (patch)
treee57927aadd000b1b4cfa43a9a80bb2ba5695ecc0 /clang/test/Sema/format-strings.c
parent3903320a48b2cc4ca08c04b6e621ace34de74b29 (diff)
downloadbcm5719-llvm-e413e88f2ea75d30c2ecb9ac1bda9d7ea3b8853c.tar.gz
bcm5719-llvm-e413e88f2ea75d30c2ecb9ac1bda9d7ea3b8853c.zip
Fix some Window-isms to get these tests to pass on Windows.
llvm-svn: 85450
Diffstat (limited to 'clang/test/Sema/format-strings.c')
-rw-r--r--clang/test/Sema/format-strings.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index 1826c7457e3..797e53c1bd2 100644
--- a/clang/test/Sema/format-strings.c
+++ b/clang/test/Sema/format-strings.c
@@ -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 @@ void check_wide_string(char* b, ...)
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) {
OpenPOWER on IntegriCloud