Douglas Gregor | ddb2147 | 2011-11-02 23:04:16 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Douglas Gregor | ddb2147 | 2011-11-02 23:04:16 +0000 | [diff] [blame] | 3 | |
4 | // <rdar://problem/10228639> | ||||
5 | class Foo { | ||||
6 | ~Foo(); | ||||
7 | Foo(const Foo&); | ||||
8 | public: | ||||
9 | Foo(int); | ||||
10 | }; | ||||
11 | |||||
12 | class Bar { | ||||
13 | int foo_count; | ||||
14 | Foo foos[0]; | ||||
15 | Foo foos2[0][2]; | ||||
16 | Foo foos3[2][0]; | ||||
17 | |||||
18 | public: | ||||
19 | Bar(): foo_count(0) { } | ||||
20 | ~Bar() { } | ||||
21 | }; | ||||
22 | |||||
23 | void testBar() { | ||||
24 | Bar b; | ||||
25 | Bar b2(b); | ||||
26 | b = b2; | ||||
27 | } |