Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10 |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // RUN: grep "objc_assign_strongCast" %t | count 2 |
Fariborz Jahanian | a5da902 | 2010-05-19 23:07:54 +0000 | [diff] [blame^] | 3 | // RUN: %clang_cc1 -x objective-c++ %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10 |
| 4 | // RUN: grep "objc_assign_strongCast" %t | count 2 |
Daniel Dunbar | e226534 | 2009-05-23 02:49:02 +0000 | [diff] [blame] | 5 | |
| 6 | // This should generate a strong cast. |
| 7 | |
| 8 | id test3(id x) { |
| 9 | __block id result; |
| 10 | ^{ result = x; }(); |
| 11 | return result; |
| 12 | } |