1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o - 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc@interface MyList 4*f4a2713aSLionel Sambuc- (id) allKeys; 5*f4a2713aSLionel Sambuc@end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@implementation MyList 8*f4a2713aSLionel Sambuc- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount 9*f4a2713aSLionel Sambuc{ 10*f4a2713aSLionel Sambuc return 0; 11*f4a2713aSLionel Sambuc} 12*f4a2713aSLionel Sambuc- (id) allKeys { return 0; } 13*f4a2713aSLionel Sambuc@end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@interface MyList (BasicTest) 16*f4a2713aSLionel Sambuc- (void)compilerTestAgainst; 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambucint LOOP(); 20*f4a2713aSLionel Sambuc@implementation MyList (BasicTest) 21*f4a2713aSLionel Sambuc- (void)compilerTestAgainst { 22*f4a2713aSLionel Sambuc MyList * el; 23*f4a2713aSLionel Sambuc for (el in [el allKeys]) { LOOP(); 24*f4a2713aSLionel Sambuc } 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc for (id el1 in[el allKeys]) { LOOP(); 27*f4a2713aSLionel Sambuc } 28*f4a2713aSLionel Sambuc for (el in([el allKeys])) { LOOP(); 29*f4a2713aSLionel Sambuc } 30*f4a2713aSLionel Sambuc} 31*f4a2713aSLionel Sambuc@end 32*f4a2713aSLionel Sambuc 33