2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2009-01-17 08:00:40 +08:00
|
|
|
|
2011-02-10 06:20:01 +08:00
|
|
|
struct __objcFastEnumerationState;
|
2009-04-13 04:42:31 +08:00
|
|
|
@implementation MyList // expected-warning {{cannot find interface declaration for 'MyList'}}
|
2009-03-30 01:27:48 +08:00
|
|
|
- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
|
2009-01-17 08:00:40 +08:00
|
|
|
{
|
2009-03-30 01:27:48 +08:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
int LOOP();
|
|
|
|
|
2009-04-13 04:42:31 +08:00
|
|
|
@implementation MyList (BasicTest)
|
2009-03-30 01:27:48 +08:00
|
|
|
- (void)compilerTestAgainst {
|
2009-04-13 04:42:31 +08:00
|
|
|
MyList * el;
|
|
|
|
for (el in @"foo")
|
2009-03-30 01:27:48 +08:00
|
|
|
{ LOOP(); }
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
static int test7(id keys) {
|
|
|
|
for (id key; in keys) ; // expected-error {{use of undeclared identifier 'in'}}
|
2009-01-17 08:00:40 +08:00
|
|
|
}
|