2010-01-17 04:21:20 +08:00
|
|
|
// RUN: %clang_cc1 -verify %s
|
|
|
|
template<typename T>
|
|
|
|
void f0() {
|
|
|
|
struct X;
|
|
|
|
typedef struct Y {
|
|
|
|
T (X::* f1())(int) { return 0; }
|
|
|
|
} Y2;
|
|
|
|
|
|
|
|
Y2 y = Y();
|
|
|
|
}
|
|
|
|
|
|
|
|
template void f0<int>();
|
2010-01-17 04:52:59 +08:00
|
|
|
|
|
|
|
// PR5764
|
|
|
|
namespace PR5764 {
|
|
|
|
class X {
|
|
|
|
template <typename T>
|
|
|
|
void Bar() {
|
2010-01-17 06:29:39 +08:00
|
|
|
typedef T ValueType;
|
2010-01-17 04:52:59 +08:00
|
|
|
class Y {
|
2010-01-17 06:29:39 +08:00
|
|
|
Y() { V = ValueType(); }
|
|
|
|
|
|
|
|
ValueType V;
|
2010-01-17 04:52:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
Y y;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
void test(X x) {
|
|
|
|
x.Bar<int>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|