summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/rewrite-foreach-1.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/rewrite-foreach-1.m')
-rw-r--r--clang/test/Sema/rewrite-foreach-1.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/clang/test/Sema/rewrite-foreach-1.m b/clang/test/Sema/rewrite-foreach-1.m
new file mode 100644
index 00000000000..71e3fbd582e
--- /dev/null
+++ b/clang/test/Sema/rewrite-foreach-1.m
@@ -0,0 +1,29 @@
+// 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();
+@implementation MyList (BasicTest)
+- (void)compilerTestAgainst {
+ id el;
+ for (el in self)
+ { LOOP(); }
+ for (id el1 in self)
+ LOOP();
+}
+@end
+
OpenPOWER on IntegriCloud