1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
7 #if __cplusplus >= 201103L
8 // expected-note@-2 2 {{overridden virtual function is here}}
13 #if __cplusplus <= 199711L
14 // expected-error@-2 {{no suitable member 'operator delete' in 'B'}}
16 // expected-error@-4 {{deleted function '~B' cannot override a non-deleted function}}
17 // expected-note@-5 {{virtual destructor requires an unambiguous, accessible 'operator delete'}}
20 #if __cplusplus <= 199711L
21 // expected-note@-2 {{implicit destructor for 'B' first required here}}
24 void operator delete(void *, int);
25 #if __cplusplus <= 199711L
26 // expected-note@-2 {{'operator delete' declared here}}
31 #if __cplusplus <= 199711L
32 // expected-error@-2 {{no suitable member 'operator delete' in 'C'}}
34 // expected-error@-4 {{deleted function '~C' cannot override a non-deleted function}}
35 // expected-note@-5 {{virtual destructor requires an unambiguous, accessible 'operator delete'}}
37 void operator delete(void *, int);
38 #if __cplusplus <= 199711L
39 // expected-note@-2 {{'operator delete' declared here}}
46 #if __cplusplus <= 199711L
47 // expected-note@-2 {{implicit destructor for 'C' first required here}}
51 // Make sure that the key-function computation is consistent when the
52 // first virtual member function of a nested class has an inline body.
60 void Outer::Inner::g() { }