From: Fariborz Jahanian Date: Wed, 9 Jan 2008 00:47:02 +0000 (+0000) Subject: Another test case for testing rewriteing of nested foreach-statement. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f93ce9e30bfa9be44d09ce0321db5e8472d86ef;p=clang Another test case for testing rewriteing of nested foreach-statement. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45769 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Sema/rewrite-foreach-2.m b/test/Sema/rewrite-foreach-2.m new file mode 100644 index 0000000000..5078e6004e --- /dev/null +++ b/test/Sema/rewrite-foreach-2.m @@ -0,0 +1,34 @@ +// RUN: clang -rewrite-test %s + +@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(); +int INNERLOOP(); +void END_LOOP(); +@implementation MyList (BasicTest) +- (void)compilerTestAgainst { + id el; + for (el in self) + { LOOP(); + for (id el1 in self) + INNER_LOOP(); + + END_LOOP(); + } +} +@end +