// RUN: %clang_cc1 -fsyntax-only -verify %s // This is not well-formed C++ but used to crash in sema. template struct X { template struct A { // expected-note {{not-yet-instantiated member is declared here}} template struct B { template struct C { template struct D { template struct E { template void operator+=(Z); }; }; }; }; }; template template template template template template friend void A::template B::template C::template D::template E::operator+=(Z); // expected-warning {{not supported}} expected-error {{no member 'A' in 'X'; it has not yet been instantiated}} }; void test() { X::A::B::C::D::E() += 1.0; // expected-note {{in instantiation of template class 'X' requested here}} }