aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-27 08:34:51 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-27 08:34:51 +0000
commite3fc54790250076e33ad25b14e5be293514fe5ea (patch)
tree018687ffe4c2b9251df2b6217ca1c5251670faad /test/Sema/format-strings.c
parentdab10acd5642b7319dd586922728c528c47d3b30 (diff)
Fix crasher caused by setting a bit in a possibly empty bitvector while
doing printf format string checking. This is a recent regression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97318 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 e92e17da08..21d3aec840 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -145,6 +145,7 @@ void torture(va_list v8) {
}
void test10(int x, float f, int i, long long lli) {
+ printf("%s"); // expected-warning{{more '%' conversions than data arguments}}
printf("%@", 12); // expected-warning{{invalid conversion specifier '@'}}
printf("\0"); // expected-warning{{format string contains '\0' within the string body}}
printf("xs\0"); // expected-warning{{format string contains '\0' within the string body}}