diff options
Diffstat (limited to 'test/SemaCXX/format-strings.cpp')
-rw-r--r-- | test/SemaCXX/format-strings.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/format-strings.cpp b/test/SemaCXX/format-strings.cpp index 2011a71b48..4f5b74d170 100644 --- a/test/SemaCXX/format-strings.cpp +++ b/test/SemaCXX/format-strings.cpp @@ -13,3 +13,7 @@ void f(char **sp, float *fp) { printf("%a", 1.0); scanf("%afoobar", fp); } + +void g() { + printf("%ls", "foo"); // expected-warning{{format specifies type 'wchar_t *' but the argument has type 'const char *'}} +} |