1 // RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify %s
3 struct A {
4   virtual ~A();
5 };
6 
7 struct B : A { // expected-error {{no suitable member 'operator delete' in 'B'}}
8   virtual void f();
9 
10   void operator delete (void *, int); // expected-note {{'operator delete' declared here}}
11 };
12 
13 #ifdef MSABI
14 B b; // expected-note {{implicit destructor for 'B' first required here}}
15 #else
f()16 void B::f() { // expected-note {{implicit destructor for 'B' first required here}}
17 }
18 #endif
19 
20 struct C : A { // expected-error {{no suitable member 'operator delete' in 'C'}}
21   C();
22   void operator delete(void *, int); // expected-note {{'operator delete' declared here}}
23 };
24 
C()25 C::C() { }  // expected-note {{implicit destructor for 'C' first required here}}
26 
27 struct D : A { // expected-error {{no suitable member 'operator delete' in 'D'}}
28   void operator delete(void *, int); // expected-note {{'operator delete' declared here}}
29 };
30 
f()31 void f() {
32   new D; // expected-note {{implicit destructor for 'D' first required here}}
33 }
34