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