1 // RUN: %clang_cc1 -std=c++2c -fsyntax-only -fblocks -verify %s
8 void d(auto......); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \
9 // expected-warning {{'...' in this location creates a C-style varargs function}} \
10 // expected-note {{preceding '...' declares a function parameter pack}} \
11 // expected-note {{insert ',' before '...' to silence this warning}}
14 void f(auto x
...); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
17 void h(auto... x
...); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \
18 // expected-warning {{'...' in this location creates a C-style varargs function}} \
19 // expected-note {{preceding '...' declares a function parameter pack}} \
20 // expected-note {{insert ',' before '...' to silence this warning}}
21 void i(auto... x
, ...);
24 void j(Ts
... t
...) {}; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \
25 // expected-warning {{'...' in this location creates a C-style varargs function}} \
26 // expected-note {{preceding '...' declares a function parameter pack}} \
27 // expected-note {{insert ',' before '...' to silence this warning}}
29 void k(Ts
... t
, ...) {}
31 void l(int...); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
34 void n(int x
...); // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
38 void p(this S
...) {} // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
42 void q(Ts
......) {} // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}} \
43 // expected-warning {{'...' in this location creates a C-style varargs function}} \
44 // expected-note {{preceding '...' declares a function parameter pack}} \
45 // expected-note {{insert ',' before '...' to silence this warning}}
48 void r(T
...) {} // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
50 auto type_specifier
= (void (*)(int...)) nullptr; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
52 auto lambda
= [](int...) {}; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
54 auto block
= ^(int...){}; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}