Matt Beaumont-Gay | 3334b0b | 2011-03-28 01:39:13 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | class Base { |
Richard Smith | 7a614d8 | 2011-06-11 17:19:42 +0000 | [diff] [blame] | 3 | virtual ~Base(); // expected-note {{implicitly declared private here}} |
Matt Beaumont-Gay | 3334b0b | 2011-03-28 01:39:13 +0000 | [diff] [blame] | 4 | }; |
Richard Smith | 7a614d8 | 2011-06-11 17:19:42 +0000 | [diff] [blame] | 5 | struct Foo : public Base { // expected-error {{base class 'Base' has private destructor}} |
Richard Smith | d7c56e1 | 2011-12-29 21:57:33 +0000 | [diff] [blame] | 6 | const int kBlah = 3; // expected-warning {{is a C++11 extension}} |
Matt Beaumont-Gay | 3334b0b | 2011-03-28 01:39:13 +0000 | [diff] [blame] | 7 | Foo(); |
| 8 | }; |
| 9 | struct Bar : public Foo { |
Richard Smith | 7a614d8 | 2011-06-11 17:19:42 +0000 | [diff] [blame] | 10 | Bar() { } // expected-note {{implicit default destructor for 'Foo' first required here}} |
Matt Beaumont-Gay | 3334b0b | 2011-03-28 01:39:13 +0000 | [diff] [blame] | 11 | }; |
| 12 | struct Baz { |
| 13 | Foo f; |
| 14 | Baz() { } |
| 15 | }; |