xref: /llvm-project/clang/test/SemaCXX/constexpr-many-arguments.cpp (revision fb0f5579c86377f511112f97453f8d9ba7c8d7d3)
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only %s
2 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -fexperimental-new-constant-interpreter %s
3 // PR13197
4 
5 struct type1
6 {
type1type17   constexpr type1(int a0) : my_data{a0} {}
8   int my_data[1];
9 };
10 
11 struct type2
12 {
13   typedef type1 T;
type2type214   constexpr type2(T a00, T a01, T a02, T a03, T a04, T a05, T a06, T a07, T a08, T a09,
15                        T a10, T a11, T a12, T a13, T a14, T a15, T a16, T a17, T a18, T a19,
16                        T a20, T a21, T a22)
17     : my_data{a00, a01, a02, a03, a04, a05, a06, a07, a08, a09,
18               a10, a11, a12, a13, a14, a15, a16, a17, a18, a19,
19               a20, a21, a22}
20   {}
21   type1 my_data[23];
22 };
23 
24 struct type3
25 {
type3type326   constexpr type3(type2 a0, type2 a1) : my_data{a0, a1} {}
27   type2 my_data[2];
28 };
29 
30 constexpr type3 g
31 {
32   {
33    {0},{0},{0},{0},{0},{0},{0},{0},{0},{0},
34    {0},{0},{0},{0},{0},{0},{0},{0},{0},{0},
35    {0},{0},{0}
36   },
37   {
38    {0},{0},{0},{0},{0},{0},{0},{0},{0},{0},
39    {0},{0},{0},{0},{0},{0},{0},{0},{0},{0},
40    {0},{0},{0}
41   }
42 };
43 
44