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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/default1.cpp b/test/SemaCXX/default1.cpp
index e9d8a2f..ae6ef97 100644
--- a/test/SemaCXX/default1.cpp
+++ b/test/SemaCXX/default1.cpp
@@ -32,3 +32,21 @@ void k(Y y = 17); // expected-error{{no viable conversion}} \
void kk(Y = 17); // expected-error{{no viable conversion}} \
// expected-note{{passing argument to parameter here}}
+
+int l () {
+ int m(int i, int j, int k = 3);
+ if (1)
+ {
+ int m(int i, int j = 2, int k = 4);
+ m(8);
+ }
+ return 0;
+}
+
+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}}
+ }
+}
OpenPOWER on IntegriCloud