brintos

brintos / llvm-project-archived public Read only

0
0
Text · 749 B · 4850deb Raw
44 lines · plain
1// RUN: %clang_cc1 -fsyntax-only %s2 3typedef struct objc_class *Class;4typedef struct objc_object {5 Class isa;6} *id;7    8            9@protocol P @end10 11@interface MyList12@end13    14@implementation MyList15- (unsigned int)countByEnumeratingWithState:  (struct __objcFastEnumerationState *)state objects:  (id *)items count:(unsigned int)stackcount16{17        return 0;18}19@end20 21@interface MyList (BasicTest)22- (void)compilerTestAgainst;23@end24 25@implementation MyList (BasicTest)26- (void)compilerTestAgainst {27	int i;28        for (id elem in self) 29           ++i;30        for (MyList *elem in self) 31           ++i;32        for (id<P> se in self) 33           ++i;34 35	MyList<P> *p;36        for (p in self) 37           ++i;38 39	for (p in p)40	  ++i;41}42@end43 44