// RUN: clang-cc -fsyntax-only -verify %s template struct add_pointer { typedef T* type; // expected-error{{'type' declared as a pointer to a reference}} }; add_pointer::type test1(int * ptr) { return ptr; } add_pointer::type test2(int * ptr) { return ptr; // expected-error{{incompatible type returning 'int *', expected 'add_pointer::type' (aka 'float *')}} } add_pointer::type // expected-note{{in instantiation of template class 'struct add_pointer' requested here}} \ // expected-error {{unknown type name 'type'}} test3();