2 // RUN: %clang_cc1 -pedantic -std=c++1z -include %s -verify %s
5 // RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch -fallow-pch-with-compiler-errors %s -o %t
6 // RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -fallow-pch-with-compiler-errors -verify %s
8 // RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch -fallow-pch-with-compiler-errors -fpch-instantiate-templates %s -o %t
9 // RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -fallow-pch-with-compiler-errors -verify %s
14 template<typename T
> auto decomp(const T
&t
) {
19 struct Q
{ int a
, b
; };
20 constexpr int foo(Q
&&q
) {
25 auto [noinit
]; // expected-error{{decomposition declaration '[noinit]' requires an initializer}}
32 static_assert(foo({1, 2}) == 12);
34 // expected-error@15 {{cannot decompose non-class, non-array type 'const int'}}
35 int z
= decomp(10); // expected-note {{instantiation of}}