aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2012-05-11 22:10:59 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2012-05-11 22:10:59 +0000
commite2c60667d1bc29b7e148f9c9828dcbdbfc5b82b0 (patch)
tree3af9169e1273e9c2fce9fa7b7b3f3b3ae8e9efe0 /test/Sema/format-strings.c
parent91338cf4129cfdb85af7e9ef396ab09621da10ec (diff)
Merge branch 'format-string-braced-init'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index a9a040fdc0..afc9e9720c 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -500,6 +500,10 @@ void pr9751() {
printf(kFormat17, (int[]){0}); // expected-warning{{format specifies type 'unsigned short' but the argument}}
printf("%a", (long double)0); // expected-warning{{format specifies type 'double' but the argument has type 'long double'}}
+
+ // Test braced char[] initializers.
+ const char kFormat18[] = { "%lld" }; // expected-note{{format string is defined here}}}
+ printf(kFormat18, 0); // expected-warning{{format specifies type}}
}
// PR 9466: clang: doesn't know about %Lu, %Ld, and %Lx