repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[clang] Handle __declspec() attributes in using
[llvm-project.git]
/
clang
/
test
/
CodeGenCXX
/
2007-04-10-PackedUnion.cpp
blob
863fc82692e9799b30b6a457183011c91af76458
1
// RUN: %clang_cc1 -emit-llvm %s -o /dev/null
2
extern
"C"
{
3
4
#pragma pack(push, 2)
5
typedef
struct
ABC
*
abc
;
6
7
struct
ABCS
{
8
float
red
;
9
float
green
;
10
float
blue
;
11
float
alpha
;
12
};
13
14
typedef
void
(*
XYZ
)();
15
#pragma pack(pop)
16
}
17
18
19
union
ABCU
{
20
ABCS color
;
21
XYZ bg
;
22
};
23
24
struct
AData
{
25
ABCU data
;
26
};
27
28
class
L
{
29
public
:
30
L
() {}
31
L
(
const
L
&
other
);
32
33
private
:
34
AData fdata
;
35
};
36
37
38
L
::
L
(
const
L
&
other
)
39
{
40
fdata
=
other
.
fdata
;
41
}