1 // RUN: %clang_cc1 -verify %s 2 3 void a(int x = 0, int y); // #1 expected-error {{missing default argument on parameter 'y'}} 4 void b() { 5 a(); // expected-error {{no matching function}} expected-note@#1 {{requires 2 arguments, but 0 were provided}} 6 a(0); // expected-error {{no matching function}} expected-note@#1 {{requires 2 arguments, but 1 was provided}} 7 a(0, 0); 8 } 9 10 void a(int x, int y = 0); 11 void c() { 12 a(); 13 a(0); 14 a(0, 0); 15 } 16 17 template<typename ...T> void f(int x = 0, T ...); // #2 18 void g() { 19 f<int>(); // expected-error {{no matching function}} expected-note@#2 {{requires 2 arguments, but 0 were provided}} 20 f<int>(0); // expected-error {{no matching function}} expected-note@#2 {{requires 2 arguments, but 1 was provided}} 21 f<int>(0, 0); 22 } 23