summaryrefslogtreecommitdiff
path: root/test/SemaCXX/zero-length-arrays.cpp
blob: d86ab8666d53ee5bb59569df4bd29a3349445bdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics

// <rdar://problem/10228639>
class Foo {
  ~Foo();
  Foo(const Foo&);
public:
  Foo(int);
};

class Bar {
  int foo_count;
  Foo foos[0];
  Foo foos2[0][2];
  Foo foos3[2][0];

public:
  Bar(): foo_count(0) { }    
  ~Bar() { }
};

void testBar() {
  Bar b;
  Bar b2(b);
  b = b2;
}