// RUN: clang-cc -fsyntax-only -verify %s template U f0(T t) { return t.template get(); } template int &f1(T t) { // FIXME: When we pretty-print this, we lose the "template" keyword. return t.U::template get(); } struct X { template T get(); }; void test_f0(X x) { int i = f0(x); int &ir = f0(x); } struct XDerived : public X { }; void test_f1(XDerived xd) { int &ir = f1(xd); } // PR5213 template struct A {}; template class B { A a_; public: void destroy(); }; template void B::destroy() { a_.~A(); } void do_destroy_B(B b) { b.destroy(); }