1ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor// RUN: %clang_cc1 -fsyntax-only -verify %s
28e8fb3be5bd78f0564444eca02b404566a5f3b5dAndy Gibbs// expected-no-diagnostics
3ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor
4ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor// <rdar://problem/10228639>
5ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregorclass Foo {
6ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  ~Foo();
7ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Foo(const Foo&);
8ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregorpublic:
9ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Foo(int);
10ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor};
11ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor
12ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregorclass Bar {
13ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  int foo_count;
14ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Foo foos[0];
15ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Foo foos2[0][2];
16ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Foo foos3[2][0];
17ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor
18ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregorpublic:
19ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Bar(): foo_count(0) { }
20ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  ~Bar() { }
21ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor};
22ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor
23ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregorvoid testBar() {
24ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Bar b;
25ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  Bar b2(b);
26ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor  b = b2;
27ddb21473ef1ff20b3abf7ba3cd6cb29acbd5cf06Douglas Gregor}
28