[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / 2007-09-28-PackedUnionMember.c
blobfc6f55fc75e65637f7fc9bb0f58aadccf9e61c7d
1 // RUN: %clang_cc1 %s -emit-llvm -o -
3 #pragma pack(push, 2)
4 struct H {
5 unsigned long f1;
6 unsigned long f2;
7 union {
8 struct opaque1 *f3;
9 struct opaque2 *f4;
10 struct {
11 struct opaque3 *f5;
12 unsigned short f6;
13 } f7;
14 } f8;
16 #pragma pack(pop)
18 struct E {
19 unsigned long f1;
20 unsigned long f2;
23 typedef long (*FuncPtr) (void);
25 extern long bork(FuncPtr handler, const struct E *list);
27 static long hndlr(void)
29 struct H cmd = { 4, 412 };
30 struct H cmd2 = { 4, 412, 0 };
31 return 0;
33 void foo(void *inWindow) {
34 static const struct E events[] = {
35 { 123124, 1 }
37 bork(hndlr, events);