blob: 768eb2170a155cc111a976fbace192d3782745cc [file] [log] [blame]
Douglas Gregor79c22782010-01-16 20:21:20 +00001// RUN: %clang_cc1 -verify %s
2template<typename T>
3void f0() {
4 struct X;
5 typedef struct Y {
6 T (X::* f1())(int) { return 0; }
7 } Y2;
8
9 Y2 y = Y();
10}
11
12template void f0<int>();
Douglas Gregor26997fd2010-01-16 20:52:59 +000013
14// PR5764
15namespace PR5764 {
16 class X {
17 template <typename T>
18 void Bar() {
Douglas Gregor60406be2010-01-16 22:29:39 +000019 typedef T ValueType;
Douglas Gregor26997fd2010-01-16 20:52:59 +000020 class Y {
Douglas Gregor60406be2010-01-16 22:29:39 +000021 Y() { V = ValueType(); }
22
23 ValueType V;
Douglas Gregor26997fd2010-01-16 20:52:59 +000024 };
25
26 Y y;
27 }
28 };
29
30 void test(X x) {
31 x.Bar<int>();
32 }
33}
34