Fix the clang-wpa example.
[clang.git] / test / CodeGenCXX / default-destructor-synthesis.cpp
blobfac5cc01f6b72aaa97c4aa6a8718bd1514fce478
1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O2 -o - | FileCheck %s
2 static int count = 0;
4 struct S {
5 S() { count++; }
6 ~S() { count--; }
7 };
9 struct P {
10 P() { count++; }
11 ~P() { count--; }
14 struct Q {
15 Q() { count++; }
16 ~Q() { count--; }
19 struct M : Q, P {
20 S s;
21 Q q;
22 P p;
23 P p_arr[3];
24 Q q_arr[2][3];
27 // CHECK: define i32 @_Z1fv() nounwind
28 int f() {
30 count = 1;
31 M a;
34 // CHECK: ret i32 1
35 return count;