Allow resolving headers from a PCH even after headers+PCH were moved to another path.
[clang.git] / test / Parser / objc-forcollection-neg-2.m
blob6aa74c9c0b45dd429310b16ccf12964a49add74a
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 typedef struct objc_class *Class;
4 struct __objcFastEnumerationState; 
5 typedef struct objc_object {
6  Class isa;
7 } *id;
8     
9 @protocol P @end
11 @interface MyList
12 @end
13     
14 @implementation MyList
15 - (unsigned int)countByEnumeratingWithState:  (struct __objcFastEnumerationState *)state objects:  (id *)items count:(unsigned int)stackcount
17         return 0;
19 @end
21 @interface MyList (BasicTest)
22 - (void)compilerTestAgainst;
23 @end
25 @implementation MyList (BasicTest)
26 - (void)compilerTestAgainst {
27     static i;// expected-warning {{type specifier missing, defaults to 'int'}}
28         for (id el, elem in self)  // expected-error {{only one element declaration is allowed}}
29            ++i;
30         for (id el in self) 
31            ++i;
32         MyList<P> ***p;
33         for (p in self)  // expected-error {{selector element type 'MyList<P> ***' is not a valid object type}}
34            ++i;
37 @end