From 4554f9b134307c7aa44686ce6982a0af5a9fc0f2 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 13 May 2009 16:06:05 +0000 Subject: Fix [format string] Assertion failed: (Arg < NumArgs && "Arg access out of range!"). For format string checking, only check the type of the format specifier for non-vararg functions. llvm-svn: 71672 --- clang/test/Sema/format-strings.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/test/Sema/format-strings.c') diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c index 50903b0cf83..1826c7457e3 100644 --- a/clang/test/Sema/format-strings.c +++ b/clang/test/Sema/format-strings.c @@ -125,3 +125,8 @@ void test9(char *P) { printf(P, 42); printf("%n", &x); // expected-warning {{use of '%n' in format string discouraged }} } + +void torture(va_list v8) { + vprintf ("%*.*d", v8); // no-warning +} + -- cgit v1.2.3