1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
3 struct __objcFastEnumerationState;
4 typedef struct objc_class *Class;
5 typedef struct objc_object {
13 @implementation MyList
14 - (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
20 @interface MyList (BasicTest)
21 - (void)compilerTestAgainst;
24 @implementation MyList (BasicTest)
25 - (void)compilerTestAgainst {
28 for (int * elem in elem) // expected-error {{selector element type 'int *' is not a valid object}} \
29 expected-error {{the type 'int *' is not a pointer to a fast-enumerable object}}
31 for (i in elem) // expected-error {{use of undeclared identifier 'elem'}} \
32 expected-error {{selector element type 'int' is not a valid object}}
34 for (id se in i) // expected-error {{the type 'int' is not a pointer to a fast-enumerable object}}