Eli Friedman | aa5ab26 | 2012-02-23 23:47:16 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify %s |
2 | |||||
3 | // Make sure pragma pack works inside ObjC methods. <rdar://problem/10893316> | ||||
4 | @interface X | ||||
5 | @end | ||||
6 | @implementation X | ||||
7 | - (void)Y { | ||||
8 | #pragma pack(push, 1) | ||||
9 | struct x { | ||||
10 | char a; | ||||
11 | int b; | ||||
12 | }; | ||||
13 | #pragma pack(pop) | ||||
14 | typedef char check_[sizeof (struct x) == 5 ? 1 : -1]; | ||||
15 | } | ||||
16 | @end |