summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/objc-foreach-error-1.m
blob: e65c32900506b277e7c4323e714c07e11511e138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: clang -fsyntax-only -verify %s

ce MyList // expected-error {{invalid token after top level declarator}}
@end


@implementation MyList
- (unsigned int)countByEnumeratingWithState:  (struct __objcFastEnumerationState *)state objects:  (id *)items count:(unsigned int)stackcount
{
     return 0;
}
@end


int LOOP();

@implementation MyList (BasicTest)  // expected-error {{cannot find interface declaration for 'MyList'}}
- (void)compilerTestAgainst {
MyList * el;  // expected-error {{use of undeclared identifier 'MyList'}}
     for (el in @"foo")    // expected-error {{use of undeclared identifier 'el'}}
	  { LOOP(); }
}
@end

OpenPOWER on IntegriCloud