When checking printf-arguments for functions with '__attribute__ ((format (printf, X, Y)))'
set HasVAListArg to true when 'Y' is 0 (i.e., ignore the data arguments).

This fixes <rdar://problem/6623513>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65642 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/format-attribute.c b/test/Sema/format-attribute.c
index ecdef9d..a1cd0b8 100644
--- a/test/Sema/format-attribute.c
+++ b/test/Sema/format-attribute.c
@@ -24,3 +24,11 @@
 };
 
 typedef int (*f3_ptr)(char*,...) __attribute__((format(printf,1,0))); // no-error
+
+// <rdar://problem/6623513>
+int rdar6623513(void *, const char*, const char*, ...)
+  __attribute__ ((format (printf, 3, 0)));
+
+int rdar6623513_aux(int len, const char* s) {
+  rdar6623513(0, "hello", "%.*s", len, s);
+}