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 <= 199711L
8 // expected-note@-2 {{implicitly declared private here}}
10 // expected-note@-4 {{overridden virtual function is here}}
14 struct Foo
: public Base
{
15 #if __cplusplus <= 199711L
16 // expected-error@-2 {{base class 'Base' has private destructor}}
18 // expected-error@-4 {{deleted function '~Foo' cannot override a non-deleted function}}
19 // expected-note@-5 3{{destructor of 'Foo' is implicitly deleted because base class 'Base' has an inaccessible destructor}}
23 #if __cplusplus <= 199711L
24 // expected-warning@-2 {{default member initializer for non-static data member is a C++11 extension}}
30 struct Bar
: public Foo
{
32 #if __cplusplus <= 199711L
33 // expected-note@-2 {{implicit destructor for 'Foo' first required here}}
35 // expected-error@-4 {{attempt to use a deleted function}}
42 #if __cplusplus >= 201103L
43 // expected-error@-2 {{attempt to use a deleted function}}