microsoft-dtor-lookup.cpp revision f51cfb89b3fe317318e434db4856b06a90afc126
1// RUN: %clang_cc1 -triple i686-pc-win32 -cxx-abi itanium -fsyntax-only %s 2// RUN: %clang_cc1 -triple i686-pc-win32 -cxx-abi microsoft -verify %s 3 4// Should be accepted under the Itanium ABI (first RUN line) but rejected 5// under the Microsoft ABI (second RUN line), as Microsoft ABI requires 6// operator delete() lookups to be done at all virtual destructor declaration 7// points. 8 9struct A { 10 void operator delete(void *); // expected-note {{member found by ambiguous name lookup}} 11}; 12 13struct B { 14 void operator delete(void *); // expected-note {{member found by ambiguous name lookup}} 15}; 16 17struct C : A, B { 18 ~C(); 19}; 20 21struct VC : A, B { 22 virtual ~VC(); // expected-error {{member 'operator delete' found in multiple base classes of different types}} 23}; 24