blob: 1fe45b0cffcbc2b8f7d63a8dab758126dc63ae91 [file] [log] [blame]
John McCall811d0be2010-05-28 08:37:35 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3// Note: this is intentionally -fno-exceptions, not just accidentally
4// so because that's the current -cc1 default.
5
6// PR7243: redeclarations
7namespace test0 {
8 void foo() throw(int);
9 void foo() throw();
10}
11
12// Overrides.
13namespace test1 {
14 struct A {
15 virtual void foo() throw();
16 };
17
18 struct B : A {
19 virtual void foo() throw(int);
20 };
21}
22
23// Calls from less permissive contexts. We don't actually do this
24// check, but if we did it should also be disabled under
25// -fno-exceptions.
26namespace test2 {
27 void foo() throw(int);
28 void bar() throw() {
29 foo();
30 }
31}
32