// RUN: %clang_cc1 -fsyntax-only %s // PR4607 template struct X {}; template <> struct X { static char* g(); }; template struct X2 {}; template struct X2 { static void f() { X::g(); } }; void a(char *a, char *b) {X2::f();} namespace WonkyAccess { template struct X { int m; }; template class Y; template struct Y : X { }; template<> struct Y : X { }; int f(Y y, Y y2) { return y.m + y2.m; } } // namespace rdar9169404 { template struct X { }; template struct X { typedef int type; }; X::type value; }