xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/static-array-member.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc struct X0 {
4*f4a2713aSLionel Sambuc   static int array[];
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc   int x;
7*f4a2713aSLionel Sambuc   int y;
8*f4a2713aSLionel Sambuc };
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc int X0::array[sizeof(X0) * 2];
11*f4a2713aSLionel Sambuc 
12*f4a2713aSLionel Sambuc template<typename T, int N>
13*f4a2713aSLionel Sambuc struct X1 {
14*f4a2713aSLionel Sambuc   static T array[];
15*f4a2713aSLionel Sambuc };
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc template<typename T, int N>
18*f4a2713aSLionel Sambuc T X1<T, N>::array[N];
19