p3.cpp revision 4719f4e86a84dec6f5a45771ae51d4ec72e4617a
1// RUN: clang-cc -fsyntax-only -verify %s 2struct A0 { 3 struct K { }; 4}; 5 6template <typename T> struct B0: A0 { 7 static void f() { 8 K k; 9 } 10}; 11 12namespace E1 { 13 typedef double A; 14 15 template<class T> class B { 16 typedef int A; 17 }; 18 19 template<class T> 20 struct X : B<T> { 21 A* blarg(double *dp) { 22 return dp; 23 } 24 }; 25} 26 27namespace E2 { 28 struct A { 29 struct B; 30 int *a; 31 int Y; 32 }; 33 34 int a; 35 template<class T> struct Y : T { 36 struct B { /* ... */ }; 37 B b; 38 void f(int i) { a = i; } 39 Y* p; 40 }; 41 42 Y<A> ya; 43} 44