]> granicus.if.org Git - clang/commitdiff
Add a testcase for PR6501 (too many/too few arguments to a function call).
authorEric Christopher <echristo@apple.com>
Mon, 19 Apr 2010 18:39:43 +0000 (18:39 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 19 Apr 2010 18:39:43 +0000 (18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101800 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/exprs.c

index 4df8188e434ec3b41560a6ae9861ad80e88d84c5..dbb6e80aa6d571fba2ed8e1f7426c667986f41a1 100644 (file)
@@ -128,3 +128,9 @@ void test17(int x) {
   x = sizeof(x/0);  // no warning.
 }
 
+// PR6501
+void test18_a(int a);
+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}}
+}