xref: /llvm-project/clang/test/CXX/expr/expr.post/expr.call/p4.cpp (revision b5f2c4e45b8d54063051e6955cef0bbb7b6ab0f8)
1 // RUN: %clang_cc1 -verify %s
2 
3 void a(int x = 0, int y); // #1 expected-error {{missing default argument on parameter 'y'}}
b()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);
c()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
g()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