1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambucstruct __objcFastEnumerationState; 4*f4a2713aSLionel Sambuc@implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}} 5*f4a2713aSLionel Sambuc- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount 6*f4a2713aSLionel Sambuc{ 7*f4a2713aSLionel Sambuc return 0; 8*f4a2713aSLionel Sambuc} 9*f4a2713aSLionel Sambuc@end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambucint LOOP(); 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc@implementation MyList (BasicTest) 15*f4a2713aSLionel Sambuc- (void)compilerTestAgainst { 16*f4a2713aSLionel SambucMyList * el; 17*f4a2713aSLionel Sambuc for (el in @"foo") 18*f4a2713aSLionel Sambuc { LOOP(); } 19*f4a2713aSLionel Sambuc} 20*f4a2713aSLionel Sambuc@end 21*f4a2713aSLionel Sambuc 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambucstatic int test7(id keys) { 24*f4a2713aSLionel Sambuc for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}} 25*f4a2713aSLionel Sambuc} 26