2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -verify %s
|
2013-12-18 03:39:18 +08:00
|
|
|
|
|
|
|
struct S {
|
2013-12-19 07:30:06 +08:00
|
|
|
virtual ~S() = delete; // expected-note {{'~S' has been explicitly marked deleted here}}
|
2013-12-18 03:39:18 +08:00
|
|
|
void operator delete(void*, int);
|
|
|
|
void operator delete(void*, double);
|
|
|
|
} s; // expected-error {{attempt to use a deleted function}}
|
|
|
|
|
2018-09-28 09:16:43 +08:00
|
|
|
struct T { // expected-note 2{{virtual destructor requires an unambiguous, accessible 'operator delete'}}
|
|
|
|
virtual ~T() = default; // expected-note {{explicitly defaulted function was implicitly deleted here}} expected-warning {{implicitly deleted}}
|
2013-12-18 03:39:18 +08:00
|
|
|
void operator delete(void*, int);
|
|
|
|
void operator delete(void*, double);
|
|
|
|
} t; // expected-error {{attempt to use a deleted function}}
|