PR5462: Don't run off the edge of the argument array for vararg handling
when there are more parameters in the prototype than arguments to the call.

llvm-svn: 88759
diff --git a/clang/test/SemaCXX/vararg-default-arg.cpp b/clang/test/SemaCXX/vararg-default-arg.cpp
new file mode 100644
index 0000000..5ba0320
--- /dev/null
+++ b/clang/test/SemaCXX/vararg-default-arg.cpp
@@ -0,0 +1,10 @@
+// RUN: clang-cc %s -verify -fsyntax-only
+// PR5462
+
+void f1(void);
+void f2(const char * = __null, ...);
+
+void f1(void)
+{
+        f2();
+}