PR11857: When the wrong number of arguments are provided for a function
which expects exactly one argument, include the name of the argument in
the diagnostic text. Patch by Terry Long!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156607 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 72cff65..8bedd6d 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -162,11 +162,17 @@
   x = sizeof(x/0);  // no warning.
 }
 
-// PR6501
+// PR6501 & PR11857
 void test18_a(int a); // expected-note 2 {{'test18_a' declared here}}
+void test18_b(int); // expected-note {{'test18_b' declared here}}
+void test18_c(int a, int b); // expected-note {{'test18_c' declared here}}
+void test18_d(int a, ...); // expected-note {{'test18_d' declared here}}
 void test18(int b) {
   test18_a(b, b); // expected-error {{too many arguments to function call, expected 1, have 2}}
-  test18_a(); // expected-error {{too few arguments to function call, expected 1, have 0}}
+  test18_a(); // expected-error {{too few arguments to function call, argument 'a' was not specified}}
+  test18_b(); // expected-error {{too few arguments to function call, expected 1, have 0}}
+  test18_c(b); // expected-error {{too few arguments to function call, expected 2, have 1}}
+  test18_d(); // expected-error {{too few arguments to function call, at least argument 'a' must be specified}}
 }
 
 // PR7569