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 0000000..5078e60
--- /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
+