]> granicus.if.org Git - clang/commitdiff
Another test case for testing rewriteing of nested foreach-statement.
authorFariborz Jahanian <fjahanian@apple.com>
Wed, 9 Jan 2008 00:47:02 +0000 (00:47 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Wed, 9 Jan 2008 00:47:02 +0000 (00:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45769 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/rewrite-foreach-2.m [new file with mode: 0644]

diff --git a/test/Sema/rewrite-foreach-2.m b/test/Sema/rewrite-foreach-2.m
new file mode 100644 (file)
index 0000000..5078e60
--- /dev/null
@@ -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
+