repo.or.cz
/
clang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix the clang-wpa example.
[clang.git]
/
test
/
CodeGenCXX
/
default-destructor-synthesis.cpp
blob
fac5cc01f6b72aaa97c4aa6a8718bd1514fce478
1
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O2 -o - | FileCheck %s
2
static int
count
=
0
;
3
4
struct
S
{
5
S
() {
count
++; }
6
~
S
() {
count
--; }
7
};
8
9
struct
P
{
10
P
() {
count
++; }
11
~
P
() {
count
--; }
12
};
13
14
struct
Q
{
15
Q
() {
count
++; }
16
~
Q
() {
count
--; }
17
};
18
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
];
25
};
26
27
// CHECK: define i32 @_Z1fv() nounwind
28
int
f
() {
29
{
30
count
=
1
;
31
M a
;
32
}
33
34
// CHECK: ret i32 1
35
return
count
;
36
}