brintos

brintos / llvm-project-archived public Read only

0
0
Text · 733 B · 45d05f3 Raw
35 lines · cpp
1// RUN: %clang_cc1 %std_cxx98-14 -fsyntax-only -verify -fexceptions -fobjc-exceptions %s2// expected-no-diagnostics3 4// Note that we're specifically excluding -fcxx-exceptions in the command line above.5 6// That this should work even with -fobjc-exceptions is PR93587 8// PR7243: redeclarations9namespace test0 {10  void foo() throw(int);11  void foo() throw();12}13 14// Overrides.15namespace test1 {16  struct A {17    virtual void foo() throw();18  };19 20  struct B : A {21    virtual void foo() throw(int);22  };23}24 25// Calls from less permissive contexts.  We don't actually do this26// check, but if we did it should also be disabled under27// -fno-exceptions.28namespace test2 {29  void foo() throw(int);30  void bar() throw() {31    foo();32  }33}34 35