llvm-project
26 строк · 716.0 Байт
1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2
3struct __objcFastEnumerationState;
4@implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}}
5- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
6{
7return 0;
8}
9@end
10
11
12int LOOP(void);
13
14@implementation MyList (BasicTest)
15- (void)compilerTestAgainst {
16MyList * el;
17for (el in @"foo")
18{ LOOP(); }
19}
20@end
21
22
23static int test7(id keys) {
24for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}} \
25// expected-error {{expected ';' in 'for' statement specifier}}
26}
27