1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple i686-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc// Make sure pragma pack works inside ObjC methods. <rdar://problem/10893316> 5*f4a2713aSLionel Sambuc@interface X 6*f4a2713aSLionel Sambuc@end 7*f4a2713aSLionel Sambuc@implementation X 8*f4a2713aSLionel Sambuc- (void)Y { 9*f4a2713aSLionel Sambuc#pragma pack(push, 1) 10*f4a2713aSLionel Sambuc struct x { 11*f4a2713aSLionel Sambuc char a; 12*f4a2713aSLionel Sambuc int b; 13*f4a2713aSLionel Sambuc }; 14*f4a2713aSLionel Sambuc#pragma pack(pop) 15*f4a2713aSLionel Sambuc typedef char check_[sizeof (struct x) == 5 ? 1 : -1]; 16*f4a2713aSLionel Sambuc} 17*f4a2713aSLionel Sambuc@end 18