blob: 6869bca90d0afd9fac13f1e4b8b0e1a50c24eda0 [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Eli Friedmanaa5ab262012-02-23 23:47:16 +00003
4// Make sure pragma pack works inside ObjC methods. <rdar://problem/10893316>
5@interface X
6@end
7@implementation X
8- (void)Y {
9#pragma pack(push, 1)
10 struct x {
11 char a;
12 int b;
13 };
14#pragma pack(pop)
15 typedef char check_[sizeof (struct x) == 5 ? 1 : -1];
16}
17@end