xref: /llvm-project/clang/test/ARCMT/safe-arc-assign.m (revision 9b0a7cea0f5bb2d3197ff33734cc5411ea793e10)
1*9b0a7ceaSJohn McCall// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
2*9b0a7ceaSJohn McCall// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
3d70fb981SJohn McCall// RUN: diff %t %s.result
4d70fb981SJohn McCall
5d70fb981SJohn McCallvoid test12(id collection) {
6d70fb981SJohn McCall  for (id x in collection) {
7d70fb981SJohn McCall    x = 0;
8d70fb981SJohn McCall    x = 0;
9d70fb981SJohn McCall  }
10d70fb981SJohn McCall
11d70fb981SJohn McCall  for (__strong id x in collection) {
12d70fb981SJohn McCall    x = 0;
13d70fb981SJohn McCall  }
14d70fb981SJohn McCall}
15