aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/exception-spec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/exception-spec.cpp')
-rw-r--r--test/SemaCXX/exception-spec.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/exception-spec.cpp b/test/SemaCXX/exception-spec.cpp
index dd12f3032f..443cee98e8 100644
--- a/test/SemaCXX/exception-spec.cpp
+++ b/test/SemaCXX/exception-spec.cpp
@@ -78,6 +78,10 @@ struct D : B1, B2
{
};
+struct P : private A
+{
+};
+
struct Base
{
virtual void f1() throw();
@@ -94,6 +98,7 @@ struct Base
virtual void g2() throw(int); // expected-note {{overridden virtual function is here}}
virtual void g3() throw(A); // expected-note {{overridden virtual function is here}}
virtual void g4() throw(B1); // expected-note {{overridden virtual function is here}}
+ virtual void g5() throw(A); // expected-note {{overridden virtual function is here}}
};
struct Derived : Base
{
@@ -111,4 +116,5 @@ struct Derived : Base
virtual void g2(); // expected-error {{exception specification of overriding function is more lax}}
virtual void g3() throw(D); // expected-error {{exception specification of overriding function is more lax}}
virtual void g4() throw(A); // expected-error {{exception specification of overriding function is more lax}}
+ virtual void g5() throw(P); // expected-error {{exception specification of overriding function is more lax}}
};