blob: e7a60970e1e26d73770e7acfb4d02cd0abed06e1 [file] [log] [blame]
Peter Collingbourneb289fe62013-05-20 14:12:25 +00001// 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};