1 // RUN: %clang_cc1 -verify %s
2
3 // Some of the diagnostics produce 'did you mean?' suggestions. We don't care
4 // which ones for the purpose of this test.
5 // expected-note@* 0+{{here}}
6
7 struct A *f();
8 using Test_A = A;
9
10 void f(struct B*);
11 using Test_B = B;
12
13 struct C;
14 using Test_C = C;
15
16 struct X {
17 struct D *f();
18 void f(struct E*);
19 struct F;
20 friend struct G;
21 };
22 using Test_D = D;
23 using Test_XD = X::D; // expected-error {{no type named 'D' in 'X'}}
24 using Test_E = E;
25 using Test_XE = X::E; // expected-error {{no type named 'E' in 'X'}}
26 using Test_F = F; // expected-error {{unknown type name 'F'}}
27 using Test_XF = X::F;
28 using Test_G = G; // expected-error {{unknown type name 'G'}}
29 using Test_XG = X::G; // expected-error {{no type named 'G' in 'X'}}
30
g()31 void g() {
32 {
33 struct X {
34 struct H *f();
35 void f(struct I*);
36 struct J;
37 friend struct K;
38 };
39 using Test_H = H;
40 using Test_XH = X::H; // expected-error {{no type named}}
41 using Test_I = I;
42 using Test_XI = X::I; // expected-error {{no type named}}
43 using Test_J = J; // expected-error {{unknown type name}}
44 using Test_XJ = X::J;
45 using Test_K = K; // expected-error {{unknown type name}}
46 using Test_XK = X::K; // expected-error {{no type named}}
47 }
48 using Test_H = H; // expected-error {{unknown type name}}
49 using Test_I = I; // expected-error {{unknown type name}}
50 using Test_J = J; // expected-error {{unknown type name}}
51 using Test_K = K; // expected-error {{unknown type name}}
52 }
53 using Test_H = H; // expected-error {{unknown type name}}
54 using Test_I = I; // expected-error {{unknown type name}}
55 using Test_J = J; // expected-error {{unknown type name}}
56 using Test_K = K; // expected-error {{unknown type name}}
57