Move the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74413 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/format-attr-pr4470.c b/test/Sema/format-attr-pr4470.c
new file mode 100644
index 0000000..cba3adf
--- /dev/null
+++ b/test/Sema/format-attr-pr4470.c
@@ -0,0 +1,11 @@
+// RUN: clang-cc -fsyntax-only -verify -Wformat=2 %s
+
+#include <stdio.h>
+
+const char *foo(const char *format) __attribute__((format_arg(1)));
+
+void __attribute__((format(printf, 1, 0)))
+foo2(const char *fmt, va_list va)
+{
+        vprintf(foo(fmt), va);
+}