diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
| commit | 809500fc2c13c8173a16b052304d983864e4a1e1 (patch) | |
| tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/CXX/class.access/class.protected/p1.cpp | |
| parent | be7c9ec198dcdb5bf73a35bfbb00b3333cb87909 (diff) | |
Notes
Diffstat (limited to 'test/CXX/class.access/class.protected/p1.cpp')
| -rw-r--r-- | test/CXX/class.access/class.protected/p1.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/CXX/class.access/class.protected/p1.cpp b/test/CXX/class.access/class.protected/p1.cpp index 132ff6176c01..825447ef1605 100644 --- a/test/CXX/class.access/class.protected/p1.cpp +++ b/test/CXX/class.access/class.protected/p1.cpp @@ -329,7 +329,7 @@ namespace test8 { namespace test9 { class A { // expected-note {{member is declared here}} - protected: int foo(); // expected-note 4 {{declared}} expected-note 2 {{can only access this member on an object of type}} expected-note {{member is declared here}} + protected: int foo(); // expected-note 4 {{declared}} expected-note 3 {{can only access this member on an object of type}} expected-note 2 {{member is declared here}} }; class B : public A { // expected-note {{member is declared here}} @@ -344,14 +344,15 @@ namespace test9 { static void test(A &a) { a.foo(); // expected-error {{'foo' is a protected member}} a.A::foo(); // expected-error {{'foo' is a protected member}} - a.B::foo(); + a.B::foo(); // expected-error {{'foo' is a protected member}} a.C::foo(); // expected-error {{'foo' is a protected member}} + a.D::foo(); // expected-error {{'foo' is a protected member}} } static void test(B &b) { b.foo(); b.A::foo(); - b.B::foo(); + b.B::foo(); // accessible as named in A b.C::foo(); // expected-error {{'foo' is a protected member}} } |
