1 // RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify -std=c++11 %s
4 // RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify %s
5 // RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify -std=c++98 %s
6 // RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify -std=c++11 %s
10 #if __cplusplus >= 201103L
11 // expected-note@-2 3 {{overridden virtual function is here}}
16 #if __cplusplus <= 199711L
17 // expected-error@-2 {{no suitable member 'operator delete' in 'B'}}
19 // expected-error@-4 {{deleted function '~B' cannot override a non-deleted function}}
20 // expected-note@-5 {{virtual destructor requires an unambiguous, accessible 'operator delete'}}
22 // expected-note@-7 {{virtual destructor requires an unambiguous, accessible 'operator delete'}}
27 void operator delete (void *, int);
28 #if __cplusplus <= 199711L
29 // expected-note@-2 {{'operator delete' declared here}}
35 #if __cplusplus <= 199711L
36 // expected-note@-2 {{implicit destructor for 'B' first required here}}
38 // expected-error@-4 {{attempt to use a deleted function}}
43 #if __cplusplus <= 199711L
44 // expected-note@-2 {{implicit destructor for 'B' first required here}}
50 #if __cplusplus <= 199711L
51 // expected-error@-2 {{no suitable member 'operator delete' in 'C'}}
53 // expected-error@-4 {{deleted function '~C' cannot override a non-deleted function}}
54 // expected-note@-5 {{virtual destructor requires an unambiguous, accessible 'operator delete'}}
58 void operator delete(void *, int);
59 #if __cplusplus <= 199711L
60 // expected-note@-2 {{'operator delete' declared here}}
65 #if __cplusplus <= 199711L
66 // expected-note@-2 {{implicit destructor for 'C' first required here}}
70 #if __cplusplus <= 199711L
71 // expected-error@-2 {{no suitable member 'operator delete' in 'D'}}
73 // expected-error@-4 {{deleted function '~D' cannot override a non-deleted function}}
74 // expected-note@-5 {{virtual destructor requires an unambiguous, accessible 'operator delete'}}
76 void operator delete(void *, int);
77 #if __cplusplus <= 199711L
78 // expected-note@-2 {{'operator delete' declared here}}
84 #if __cplusplus <= 199711L
85 // expected-note@-2 {{implicit destructor for 'D' first required here}}