| // RUN: clang-cc -fsyntax-only -verify %s |
| static void ~D(int, ...) const { } // \ |
| // expected-error{{type qualifier is not allowed on this function}} \ |
| // expected-error{{destructor cannot be declared 'static'}} \ |
| // expected-error{{destructor cannot have any parameters}} \ |
| // expected-error{{destructor cannot be variadic}} |
| // expected-error{{destructor cannot have a return type}} |
| ~E_typedef(); // expected-error{{destructor cannot be declared using a typedef 'E_typedef' (aka 'struct E') of the class name}} |
| (~F)(); // expected-note {{previous declaration is here}} |
| ~F(); // expected-error {{destructor cannot be redeclared}} |
| ~; // expected-error {{expected the class name after '~' to name a destructor}} |
| ~undef(); // expected-error {{expected the class name after '~' to name a destructor}} |
| ~operator+(int, int); // expected-error {{expected the class name after '~' to name a destructor}} |
| ~F(){} // expected-error {{destructor must be a non-static member function}} |
| // <rdar://problem/6841210> |
| ~X(); // expected-error {{expected the class name after '~' to name the enclosing class}} |