llvm.org GIT mirror llvm / 81f0dbd
Add another testcase I found lying around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8186 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 17 years ago
1 changed file(s) with 23 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 #include
1
2 static int c;
3
4 struct A {
5 A() { ++c; }
6 A(const A&) { ++c; }
7 ~A() { --c; }
8 };
9
10 struct B {
11 A a;
12 B() { A a; throw 1; }
13 };
14
15 int main() {
16 try {
17 B b;
18 } catch (...) {}
19 if (!c) printf("All ok!\n");
20 return c;
21 }
22