Peter Collingbourne | b289fe6 | 2013-05-20 14:12:25 +0000 | [diff] [blame^] | 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 | |
| 9 | struct A { |
| 10 | void operator delete(void *); // expected-note {{member found by ambiguous name lookup}} |
| 11 | }; |
| 12 | |
| 13 | struct B { |
| 14 | void operator delete(void *); // expected-note {{member found by ambiguous name lookup}} |
| 15 | }; |
| 16 | |
| 17 | struct C : A, B { |
| 18 | ~C(); |
| 19 | }; |
| 20 | |
| 21 | struct VC : A, B { |
| 22 | virtual ~VC(); // expected-error {{member 'operator delete' found in multiple base classes of different types}} |
| 23 | }; |