aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-04-19 18:39:43 +0000
committerEric Christopher <echristo@apple.com>2010-04-19 18:39:43 +0000
commitc5e869b7949d162ee93c6200c0100a27544bdaa3 (patch)
tree12d61ec667bf1e3d4e84470e748ad36dd0afb3ed
parent794afcb7049bdc82a2e7391e2f84d32446a7ffae (diff)
Add a testcase for PR6501 (too many/too few arguments to a function call).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101800 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Sema/exprs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c
index 4df8188e43..dbb6e80aa6 100644
--- a/test/Sema/exprs.c
+++ b/test/Sema/exprs.c
@@ -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}}
+}