23 lines · cpp
1// RUN: %clang_cc1 -verify %s2 3void a(int x = 0, int y); // #1 expected-error {{missing default argument on parameter 'y'}}4void 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 10void a(int x, int y = 0);11void c() {12 a();13 a(0);14 a(0, 0);15}16 17template<typename ...T> void f(int x = 0, T ...); // #218void 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