1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc template<typename> struct PassRefPtr { }; 3*f4a2713aSLionel Sambuc template<typename T> struct RefPtr { operator =RefPtr4*f4a2713aSLionel Sambuc RefPtr& operator=(const RefPtr&) { int a[sizeof(T) ? -1 : -1];} // expected-error 2 {{array with a negative size}} 5*f4a2713aSLionel Sambuc RefPtr& operator=(const PassRefPtr<T>&); 6*f4a2713aSLionel Sambuc }; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc struct A { RefPtr<int> a; }; // expected-note {{instantiation of member function 'RefPtr<int>::operator=' requested here}} 9*f4a2713aSLionel Sambuc struct B : RefPtr<float> { }; // expected-note {{in instantiation of member function 'RefPtr<float>::operator=' requested here}} 10*f4a2713aSLionel Sambuc f()11*f4a2713aSLionel Sambucvoid f() { 12*f4a2713aSLionel Sambuc A a1, a2; 13*f4a2713aSLionel Sambuc a1 = a2; 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc B b1, b2; 16*f4a2713aSLionel Sambuc b1 = b2; 17*f4a2713aSLionel Sambuc } 18