1 // RUN: %clang_cc1 -fsyntax-only -verify %s
18 static void ~D(int, ...) const { } // \
19 // expected-error{{type qualifier is not allowed on this function}} \
20 // expected-error{{destructor cannot be declared 'static'}} \
21 // expected-error{{destructor cannot have any parameters}} \
22 // expected-error{{destructor cannot be variadic}}
27 // expected-error{{destructor cannot have a return type}}
35 ~E_typedef(); // expected-error{{destructor cannot be declared using a typedef 'E_typedef' (aka 'struct E') of the class name}}
39 (~F)(); // expected-note {{previous declaration is here}}
40 ~F(); // expected-error {{destructor cannot be redeclared}}
43 ~; // expected-error {{expected a class name after '~' to name a destructor}}
44 ~undef(); // expected-error {{expected the class name after '~' to name a destructor}}
45 ~operator+(int, int); // expected-error {{expected a class name after '~' to name a destructor}}
46 ~F(){} // expected-error {{destructor must be a non-static member function}}
54 // <rdar://problem/6841210>
62 ~X(); // expected-error {{expected the class name after '~' to name the enclosing class}}
66 class T; // expected-note{{forward declaration}}
68 class QGenericArgument
71 void foo(T t) // expected-error{{variable has incomplete type}}
77 bob<QGenericArgument>(t); // expected-error{{undeclared identifier 'bob'}}