2011-03-28 09:39:13 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
class Base {
|
2011-06-12 01:19:42 +08:00
|
|
|
virtual ~Base(); // expected-note {{implicitly declared private here}}
|
2011-03-28 09:39:13 +08:00
|
|
|
};
|
2011-06-12 01:19:42 +08:00
|
|
|
struct Foo : public Base { // expected-error {{base class 'Base' has private destructor}}
|
2011-12-30 05:57:33 +08:00
|
|
|
const int kBlah = 3; // expected-warning {{is a C++11 extension}}
|
2011-03-28 09:39:13 +08:00
|
|
|
Foo();
|
|
|
|
};
|
|
|
|
struct Bar : public Foo {
|
2013-06-13 11:34:55 +08:00
|
|
|
Bar() { } // expected-note {{implicit destructor for 'Foo' first required here}}
|
2011-03-28 09:39:13 +08:00
|
|
|
};
|
|
|
|
struct Baz {
|
|
|
|
Foo f;
|
|
|
|
Baz() { }
|
|
|
|
};
|