Fix <rdar://problem/6880975> [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
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index 50903b0..1826c74 100644
--- a/clang/test/Sema/format-strings.c
+++ b/clang/test/Sema/format-strings.c
@@ -125,3 +125,8 @@
   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
+}
+