1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 template<typename A
> class s0
{
4 template<typename B
> class s1
;
9 class s0
<A
>::s1
: s0
<A
> {
17 void destroy_me(T me
) {
21 template void destroy_me(Incomplete
*);
24 template<typename T
> struct X
{ void f(); };
25 template<typename T
> struct Y
{ };
29 y
->template Y
<T
>::~Y();
30 y
->template Y
<T
>::~Y
<T
>();
34 template struct X
<int>;
43 template void f
<const volatile int>(int *);
47 template<class E
> class A
{ };
59 Foo::~Foo() { // expected-error{{destructor cannot be declared as a template}}
67 namespace rdar13140795
{
68 template <class T
> class shared_ptr
{};
70 template <typename T
> struct Marshal
{
75 template <typename T
> int Marshal
<T
>::gc() {
77 x
->template shared_ptr
<T
>::~shared_ptr();
87 template<typename T
> struct S
{ int a
; T x
; };
88 template<typename T
> decltype(S
<T
>().~S()) f(); // expected-note {{candidate template ignored: couldn't infer template argument 'T'}}
89 void g() { f(); } // expected-error {{no matching function for call to 'f'}}
95 ~PR33189() { } // expected-error{{destructor cannot be declared as a template}}
101 ~S(); // expected-error{{destructor cannot be declared as a template}}
106 } // namespace PR38671