summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/exprs.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-05-15 06:21:54 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-05-15 06:21:54 +0000
commitd72da1513aa92aa47066c7aa498d987d2ae559ea (patch)
tree5474f1b7420e98ed8b013dcc41980613aba6818a /clang/test/Sema/exprs.c
parent8e4a3868fec3664125d82093ed13303ff368285b (diff)
downloadbcm5719-llvm-d72da1513aa92aa47066c7aa498d987d2ae559ea.tar.gz
bcm5719-llvm-d72da1513aa92aa47066c7aa498d987d2ae559ea.zip
Further improvement to wording of overload resolution diagnostics, and including
the sole parameter name in the diagnostic in more cases. Patch by Terry Long! llvm-svn: 156807
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r--clang/test/Sema/exprs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c
index 8bedd6dd01a..a93e12ec390 100644
--- a/clang/test/Sema/exprs.c
+++ b/clang/test/Sema/exprs.c
@@ -165,14 +165,17 @@ void test17(int x) {
// 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_c(int a, int b); // expected-note 2 {{'test18_c' declared here}}
void test18_d(int a, ...); // expected-note {{'test18_d' declared here}}
+void test18_e(int a, int b, ...); // expected-note {{'test18_e' 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, argument 'a' was not specified}}
+ test18_a(b, b); // expected-error {{too many arguments to function call, expected single argument 'a', have 2}}
+ test18_a(); // expected-error {{too few arguments to function call, single 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_c(b, b, b); // expected-error {{too many arguments to function call, expected 2, have 3}}
test18_d(); // expected-error {{too few arguments to function call, at least argument 'a' must be specified}}
+ test18_e(); // expected-error {{too few arguments to function call, expected at least 2, have 0}}
}
// PR7569
OpenPOWER on IntegriCloud