aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-22 06:00:13 +0000
committerChris Lattner <sabre@nondot.org>2009-12-22 06:00:13 +0000
commit813b70d6db54dbf149cfaa14ec7502142121d86f (patch)
treef1534ffce5d638cbfff887185e4cd30026f37490 /test/Sema/format-strings.c
parent1f24032ea28d0df9d6227e4faf89306dfa990994 (diff)
fix a bug handling the gnu ?: extension. Patch by Storlek on IRC,
who prefers to be stealthy and mysterious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index 1ad4bda10a..67081b5e26 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -50,6 +50,7 @@ void check_conditional_literal(const char* s, int i) {
printf(i == 1 ? "yes" : "no"); // no-warning
printf(i == 0 ? (i == 1 ? "yes" : "no") : "dont know"); // no-warning
printf(i == 0 ? (i == 1 ? s : "no") : "dont know"); // expected-warning{{format string is not a string literal}}
+ printf("yes" ?: "no %d", 1); // expected-warning{{more data arguments than '%' conversions}}
}
void check_writeback_specifier()