xref: /minix3/external/bsd/llvm/dist/clang/test/Rewriter/rewrite-foreach-2.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5  %s -o -
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@protocol P @end
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc@interface MyList
6*f4a2713aSLionel Sambuc@end
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc@implementation MyList
9*f4a2713aSLionel Sambuc- (unsigned int)countByEnumeratingWithState:  (struct __objcFastEnumerationState *)state objects:  (id *)items count:(unsigned int)stackcount
10*f4a2713aSLionel Sambuc{
11*f4a2713aSLionel Sambuc        return 0;
12*f4a2713aSLionel Sambuc}
13*f4a2713aSLionel Sambuc@end
14*f4a2713aSLionel Sambuc
15*f4a2713aSLionel Sambuc@interface MyList (BasicTest)
16*f4a2713aSLionel Sambuc- (void)compilerTestAgainst;
17*f4a2713aSLionel Sambuc@end
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambucint LOOP();
20*f4a2713aSLionel Sambucint INNERLOOP();
21*f4a2713aSLionel Sambucvoid END_LOOP();
22*f4a2713aSLionel Sambuc@implementation MyList (BasicTest)
23*f4a2713aSLionel Sambuc- (void)compilerTestAgainst {
24*f4a2713aSLionel Sambuc  id el;
25*f4a2713aSLionel Sambuc        for (el in self)
26*f4a2713aSLionel Sambuc	  { LOOP();
27*f4a2713aSLionel Sambuc            for (id el1 in self)
28*f4a2713aSLionel Sambuc	       INNER_LOOP();
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambuc	    END_LOOP();
31*f4a2713aSLionel Sambuc	  }
32*f4a2713aSLionel Sambuc}
33*f4a2713aSLionel Sambuc@end
34*f4a2713aSLionel Sambuc
35