2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -rewrite-objc %s -o -
|
2008-01-09 06:06:28 +08:00
|
|
|
|
|
|
|
@protocol P @end
|
|
|
|
|
|
|
|
@interface MyList
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyList
|
|
|
|
- (unsigned int)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state objects: (id *)items count:(unsigned int)stackcount
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface MyList (BasicTest)
|
|
|
|
- (void)compilerTestAgainst;
|
|
|
|
@end
|
|
|
|
|
|
|
|
int LOOP();
|
|
|
|
@implementation MyList (BasicTest)
|
|
|
|
- (void)compilerTestAgainst {
|
|
|
|
id el;
|
|
|
|
for (el in self)
|
|
|
|
{ LOOP(); }
|
|
|
|
for (id el1 in self)
|
|
|
|
LOOP();
|
2008-01-10 01:50:00 +08:00
|
|
|
|
|
|
|
for (el in (self))
|
|
|
|
if (el)
|
|
|
|
LOOP();
|
|
|
|
|
|
|
|
for (el in ((self)))
|
|
|
|
if (el)
|
|
|
|
LOOP();
|
2008-01-09 06:06:28 +08:00
|
|
|
}
|
|
|
|
@end
|
|
|
|
|