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() { | ||||
Douglas Gregor | 60406be | 2010-01-16 22:29:39 +0000 | [diff] [blame^] | 19 | typedef T ValueType; |
Douglas Gregor | 26997fd | 2010-01-16 20:52:59 +0000 | [diff] [blame] | 20 | class Y { |
Douglas Gregor | 60406be | 2010-01-16 22:29:39 +0000 | [diff] [blame^] | 21 | Y() { V = ValueType(); } |
22 | |||||
23 | ValueType V; | ||||
Douglas Gregor | 26997fd | 2010-01-16 20:52:59 +0000 | [diff] [blame] | 24 | }; |
25 | |||||
26 | Y y; | ||||
27 | } | ||||
28 | }; | ||||
29 | |||||
30 | void test(X x) { | ||||
31 | x.Bar<int>(); | ||||
32 | } | ||||
33 | } | ||||
34 |