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