1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuctypedef struct objc_class *Class; 4*f4a2713aSLionel Sambuctypedef struct objc_object { 5*f4a2713aSLionel Sambuc Class isa; 6*f4a2713aSLionel Sambuc} *id; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambuc@protocol P @end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@interface MyList 12*f4a2713aSLionel Sambuc@end 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@implementation MyList 15*f4a2713aSLionel Sambuc- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount 16*f4a2713aSLionel Sambuc{ 17*f4a2713aSLionel Sambuc return 0; 18*f4a2713aSLionel Sambuc} 19*f4a2713aSLionel Sambuc@end 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc@interface MyList (BasicTest) 22*f4a2713aSLionel Sambuc- (void)compilerTestAgainst; 23*f4a2713aSLionel Sambuc@end 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc@implementation MyList (BasicTest) 26*f4a2713aSLionel Sambuc- (void)compilerTestAgainst { 27*f4a2713aSLionel Sambuc int i; 28*f4a2713aSLionel Sambuc for (id elem in self) 29*f4a2713aSLionel Sambuc ++i; 30*f4a2713aSLionel Sambuc for (MyList *elem in self) 31*f4a2713aSLionel Sambuc ++i; 32*f4a2713aSLionel Sambuc for (id<P> se in self) 33*f4a2713aSLionel Sambuc ++i; 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc MyList<P> *p; 36*f4a2713aSLionel Sambuc for (p in self) 37*f4a2713aSLionel Sambuc ++i; 38*f4a2713aSLionel Sambuc 39*f4a2713aSLionel Sambuc for (p in p) 40*f4a2713aSLionel Sambuc ++i; 41*f4a2713aSLionel Sambuc} 42*f4a2713aSLionel Sambuc@end 43*f4a2713aSLionel Sambuc 44