Douglas Gregor | 79c2278 | 2010-01-16 20:21:20 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -verify %s |
2 | template<typename T> | ||||
3 | void f0() { | ||||
4 | struct X; | ||||
5 | typedef struct Y { | ||||
6 | T (X::* f1())(int) { return 0; } | ||||
7 | } Y2; | ||||
8 | |||||
9 | Y2 y = Y(); | ||||
10 | } | ||||
11 | |||||
12 | template void f0<int>(); | ||||
Douglas Gregor | 26997fd | 2010-01-16 20:52:59 +0000 | [diff] [blame^] | 13 | |
14 | // PR5764 | ||||
15 | namespace PR5764 { | ||||
16 | class X { | ||||
17 | template <typename T> | ||||
18 | void Bar() { | ||||
19 | class Y { | ||||
20 | Y() {} | ||||
21 | }; | ||||
22 | |||||
23 | Y y; | ||||
24 | } | ||||
25 | }; | ||||
26 | |||||
27 | void test(X x) { | ||||
28 | x.Bar<int>(); | ||||
29 | } | ||||
30 | } | ||||
31 |