Skip to content

Commit b0a33c7

Browse files
committed
Add test cases for type specifiers, lambdas and blocks
1 parent e4ef5af commit b0a33c7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/test/Parser/cxx2c-oxford-variadic-comma.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -std=c++2c -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 -std=c++2c -fsyntax-only -fblocks -verify %s
22

33
void a(...);
44

@@ -47,3 +47,8 @@ void q(Ts......) {} // expected-warning {{declaration of a variadic function wit
4747
template<class T>
4848
void r(T...) {} // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
4949

50+
auto type_specifier = (void (*)(int...)) nullptr; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
51+
52+
auto lambda = [](int...) {}; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}
53+
54+
auto block = ^(int...){}; // expected-warning {{declaration of a variadic function without a comma before '...' is deprecated}}

0 commit comments

Comments
 (0)