diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
commit | 4ba675006b5a8edfc48b6a9bd3dcf54a70cc08f2 (patch) | |
tree | 48b44512b5db8ced345df4a1a56b5065cf2a14d9 /test/CXX/class.access/p4.cpp | |
parent | d7279c4c177bca357ef96ff1379fd9bc420bfe83 (diff) |
Diffstat (limited to 'test/CXX/class.access/p4.cpp')
-rw-r--r-- | test/CXX/class.access/p4.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/CXX/class.access/p4.cpp b/test/CXX/class.access/p4.cpp index e8afbe7a3924..90a1449610f3 100644 --- a/test/CXX/class.access/p4.cpp +++ b/test/CXX/class.access/p4.cpp @@ -160,7 +160,7 @@ namespace test4 { private: operator Private(); // expected-note 4 {{declared private here}} public: - operator Public(); + operator Public(); // expected-note 2{{member is declared here}} }; class Derived1 : private Base { // expected-note 2 {{declared private here}} \ @@ -267,7 +267,7 @@ namespace test8 { // Don't silently upgrade forbidden-access paths to private. namespace test9 { class A { - public: static int x; + public: static int x; // expected-note {{member is declared here}} }; class B : private A { // expected-note {{constrained by private inheritance here}} }; @@ -420,3 +420,10 @@ namespace test15 { template class B<int>; // expected-note {{in instantiation}} template class B<long>; // expected-note 4 {{in instantiation}} } + +// PR7281 +namespace test16 { + class A { ~A(); }; // expected-note 2{{declared private here}} + void b() { throw A(); } // expected-error{{temporary of type 'test16::A' has private destructor}} \ + // expected-error{{exception object of type 'test16::A' has private destructor}} +} |