18feeb496SJohn McCall // RUN: %clang_cc1 -fsyntax-only -verify -fexceptions -fobjc-exceptions %s
2*c6e68daaSAndy Gibbs // expected-no-diagnostics
3f9c94093SJohn McCall 
48feeb496SJohn McCall // Note that we're specifically excluding -fcxx-exceptions in the command line above.
58feeb496SJohn McCall 
68feeb496SJohn McCall // That this should work even with -fobjc-exceptions is PR9358
7f9c94093SJohn McCall 
8f9c94093SJohn McCall // PR7243: redeclarations
9f9c94093SJohn McCall namespace test0 {
10f9c94093SJohn McCall   void foo() throw(int);
11f9c94093SJohn McCall   void foo() throw();
12f9c94093SJohn McCall }
13f9c94093SJohn McCall 
14f9c94093SJohn McCall // Overrides.
15f9c94093SJohn McCall namespace test1 {
16f9c94093SJohn McCall   struct A {
17f9c94093SJohn McCall     virtual void foo() throw();
18f9c94093SJohn McCall   };
19f9c94093SJohn McCall 
20f9c94093SJohn McCall   struct B : A {
21f9c94093SJohn McCall     virtual void foo() throw(int);
22f9c94093SJohn McCall   };
23f9c94093SJohn McCall }
24f9c94093SJohn McCall 
25f9c94093SJohn McCall // Calls from less permissive contexts.  We don't actually do this
26f9c94093SJohn McCall // check, but if we did it should also be disabled under
27f9c94093SJohn McCall // -fno-exceptions.
28f9c94093SJohn McCall namespace test2 {
29f9c94093SJohn McCall   void foo() throw(int);
bar()30f9c94093SJohn McCall   void bar() throw() {
31f9c94093SJohn McCall     foo();
32f9c94093SJohn McCall   }
33f9c94093SJohn McCall }
34f9c94093SJohn McCall 
35