aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/non-empty-class-size-zero.cpp
blob: 52f6e928d4c4509e1b965777e09dc5514c7c632d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s

struct X { 
  int array[0]; 
  int array1[0]; 
  int array2[0]; 
  X();
  ~X();
};

struct Y {
  int first;
  X padding;
  int second;
};

int zero_size_array[(sizeof(Y)  == 8) -1]; // no error here!