aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorJean-Daniel Dupas <devlists@shadowlab.org>2012-01-31 18:12:08 +0000
committerJean-Daniel Dupas <devlists@shadowlab.org>2012-01-31 18:12:08 +0000
commit220947bd5a66b0f25f5e74d6029769dfb34f07b4 (patch)
treef64e592dc41ceada8fce03e9af46ab59fe6e30c7 /test/Sema/format-strings.c
parent7da1f4679332277614b6c583df66c3bfd94ded66 (diff)
FormatCheckers should emit all diagnostics using EmitFormatDiagnostic().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index 341fd59908..3a95df5038 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -468,6 +468,9 @@ void pr9751() {
// 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