blob: 2e180706d3b912ac055b2e564045ed4f8b0bec80 [file] [log] [blame]
John McCall018591f2011-03-02 02:04:40 +00001// RUN: %clang_cc1 -fsyntax-only -verify -fexceptions -fobjc-exceptions %s
John McCall811d0be2010-05-28 08:37:35 +00002
John McCall018591f2011-03-02 02:04:40 +00003// 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
John McCall811d0be2010-05-28 08:37:35 +00006
7// PR7243: redeclarations
8namespace test0 {
9 void foo() throw(int);
10 void foo() throw();
11}
12
13// Overrides.
14namespace 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.
27namespace test2 {
28 void foo() throw(int);
29 void bar() throw() {
30 foo();
31 }
32}
33