summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/default1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/default1.cpp')
-rw-r--r--test/SemaCXX/default1.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/SemaCXX/default1.cpp b/test/SemaCXX/default1.cpp
index ae6ef97..c8c197e 100644
--- a/test/SemaCXX/default1.cpp
+++ b/test/SemaCXX/default1.cpp
@@ -47,6 +47,13 @@ int i () {
void j (int f = 4);
{
void j (int f); // expected-note{{'j' declared here}}
- j(); // expected-error{{too few arguments to function call, expected 1, have 0}}
+ j(); // expected-error{{too few arguments to function call, single argument 'f' was not specified}}
+ }
+}
+
+int i2() {
+ void j(int f = 4); // expected-note{{'j' declared here}}
+ {
+ j(2, 3); // expected-error{{too many arguments to function call, expected at most single argument 'f', have 2}}
}
}
OpenPOWER on IntegriCloud