blob: 4f55e5339ab2d9e6533a75107478881a45cf52d6 [file] [log] [blame]
Douglas Gregor06245bf2010-04-07 17:57:12 +00001// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
2template<typename T>
3class X0 {
4 friend T;
5};
6
7class Y1 { };
8enum E1 { };
9X0<Y1> x0a;
10X0<Y1 *> x0b;
11X0<int> x0c;
12X0<E1> x0d;
13
14template<typename T>
15class X1 {
16 friend typename T::type; // expected-error{{no type named 'type' in 'Y1'}}
17};
18
19struct Y2 {
20 struct type { };
21};
22
23struct Y3 {
24 typedef int type;
25};
26
27X1<Y2> x1a;
28X1<Y3> x1b;
29X1<Y1> x1c; // expected-note{{in instantiation of template class 'X1<Y1>' requested here}}