2012-06-20 14:18:46 +08:00
|
|
|
// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %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
|
|
|
|
|