// RUN: %clang_cc1 -fsyntax-only -verify %s template struct PassRefPtr { }; template struct RefPtr { RefPtr& operator=(const RefPtr&) { int a[sizeof(T) ? -1 : -1];} // expected-error 2 {{array with a negative size}} RefPtr& operator=(const PassRefPtr&); }; struct A { RefPtr a; }; // expected-note {{instantiation of member function 'RefPtr::operator=' requested here}} struct B : RefPtr { }; // expected-note {{in instantiation of member function 'RefPtr::operator=' requested here}} void f() { A a1, a2; a1 = a2; B b1, b2; b1 = b2; }