blob: d5db10962f94d1a36696a87956f92aa6b5c26c92 [file] [log] [blame]
Argyrios Kyrtzidis8e502972012-10-10 16:14:06 +00001// RUN: %clang_cc1 -std=c++11 -verify %s
2
3// rdar://12240916 stack overflow.
4namespace rdar12240916 {
5
6struct S2 {
7 S2(const S2&);
8 S2();
9};
10
11struct S { // expected-note {{not complete}}
12 S x; // expected-error {{incomplete type}}
13 S2 y;
14};
15
16S foo() {
17 S s;
18 return s;
19}
20
21struct S3; // expected-note {{forward declaration}}
22
23struct S4 {
24 S3 x; // expected-error {{incomplete type}}
25 S2 y;
26};
27
28struct S3 {
29 S4 x;
30 S2 y;
31};
32
33S4 foo2() {
34 S4 s;
35 return s;
36}
37
38}