// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s // expected-no-diagnostics // Check for declaration matching with out-of-line declarations and // variadic templates, which involves proper computation of the // injected-class-name. template struct X0 { typedef T type; void f0(T); type f1(T); }; template void X0::f0(T) { } template typename X0::type X0::f1(T) { } template struct X0 { typedef T* result; result f3(); template struct Inner; }; template typename X0::result X0::f3() { return 0; } template template struct X0::Inner { template void f4(); }; template template template void X0::Inner::f4() { } namespace rdar8848837 { // Out-of-line definitions that cause rebuilding in the current // instantiation. template struct X; template struct X { X f(); }; template X X::f() { return *this; } X xif; template struct unsigned_c { }; template int g(ArgTypes...); template struct X1; template struct X1 { unsigned_c f(); }; template unsigned_c X1::f() { return unsigned_c(); } X1 xif2; }