diff options
Diffstat (limited to 'clang/test/Sema/format-strings-ms.c')
| -rw-r--r-- | clang/test/Sema/format-strings-ms.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Sema/format-strings-ms.c b/clang/test/Sema/format-strings-ms.c new file mode 100644 index 00000000000..cc574a7a986 --- /dev/null +++ b/clang/test/Sema/format-strings-ms.c @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility -triple=i386-pc-win32 -pedantic %s + +int printf(const char *format, ...) __attribute__((format(printf, 1, 2))); + +void test() { + short val = 30; + printf("val = %I64d\n", val); // expected-warning{{'I64' length modifier is not supported by ISO C}} \ + // expected-warning{{format specifies type '__int64' (aka 'long long') but the argument has type 'short'}} +} |

