blob: 0062e842648b0088f59f949f707b5e7a9da1e014 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -emit-llvm -o %t -fobjc-gc -fblocks -triple i386-apple-darwin10
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep "objc_assign_strongCast" %t | count 2
Fariborz Jahaniana5da9022010-05-19 23:07:54 +00003// 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 Dunbare2265342009-05-23 02:49:02 +00005
6// This should generate a strong cast.
7
8id test3(id x) {
9 __block id result;
10 ^{ result = x; }();
11 return result;
12}