diff options
Diffstat (limited to 'test/SemaCXX/format-strings-0x.cpp')
-rw-r--r-- | test/SemaCXX/format-strings-0x.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/format-strings-0x.cpp b/test/SemaCXX/format-strings-0x.cpp index 7b3aef1..7e41c7f 100644 --- a/test/SemaCXX/format-strings-0x.cpp +++ b/test/SemaCXX/format-strings-0x.cpp @@ -24,4 +24,8 @@ void f(char **sp, float *fp) { \u1234\U0010fffe %d)foo" // expected-warning {{more '%' conversions than data arguments}} ); + + printf("init list: %d", { 0 }); // expected-error {{cannot pass initializer list to variadic function; expected type from format string was 'int'}} + printf("void: %d", f(sp, fp)); // expected-error {{cannot pass expression of type 'void' to variadic function; expected type from format string was 'int'}} + printf(0, { 0 }); // expected-error {{cannot pass initializer list to variadic function}} } |