1 // RUN: %clang_cc1 -verify -std=c++2a %s
2 // RUN: cp %s %t
3 // RUN: not %clang_cc1 -x c++ -std=c++2a -fixit %t
4 // RUN: %clang_cc1 -Wall -pedantic -x c++ -std=c++2a %t
5 
6 /* This is a test of the various code modification hints that only
7    apply in C++2a. */
init_capture_pack(T...a)8 template<typename ...T> void init_capture_pack(T ...a) {
9   [x... = a]{}; // expected-error {{must appear before the name}}
10   [x = a...]{}; // expected-error {{must appear before the name}}
11   [...&x = a]{}; // expected-error {{must appear before the name}}
12   [...a]{}; // expected-error {{must appear after the name}}
13   [&...a]{}; // expected-error {{must appear after the name}}
14   [...&a]{}; // expected-error {{must appear after the name}}
15 }
16