[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaTemplate / stmt-expr.cpp
blob2516a5220c1a7e58d890ea767514d55477cd8c2f
1 // RUN: %clang_cc1 -verify %s
3 // FIXME: We could in principle support cases like this (particularly, cases
4 // where the statement-expression contains no labels).
5 template <typename... T> void f1() {
6 int arr[] = {
7 ({
8 T(); // expected-error {{unexpanded parameter pack}}
9 }) ... // expected-error {{does not contain any unexpanded parameter packs}}
13 // FIXME: The error for this isn't ideal; it'd be preferable to say that pack
14 // expansion of a statement expression is not permitted.
15 template <typename... T> void f2() {
16 [] {
17 int arr[] = {
18 T() + ({
19 foo:
20 T t; // expected-error {{unexpanded parameter pack}}
21 goto foo;
23 }) ...
28 template <typename... T> void f3() {
30 int arr[] = {
31 [] {
32 foo:
33 T t; // OK, expanded within compound statement
34 goto foo;
35 return 0;
36 } ...
38 });