FormatCheckers should emit all diagnostics using EmitFormatDiagnostic().
llvm-svn: 149394
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index 341fd59..3a95df5 100644
--- a/clang/test/Sema/format-strings.c
+++ b/clang/test/Sema/format-strings.c
@@ -468,6 +468,9 @@
// Make sure that the "format string is defined here" note is not emitted
// when the original string is within the argument expression.
printf(1 ? "yes %d" : "no %d"); // expected-warning 2{{more '%' conversions than data arguments}}
+
+ const char kFormat17[] = "%hu"; // expected-note{{format string is defined here}}}
+ printf(kFormat17, (int[]){0}); // expected-warning{{format specifies type 'unsigned short' but the argument}}
}
// PR 9466: clang: doesn't know about %Lu, %Ld, and %Lx