1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 2*f4a2713aSLionel Sambuc // rdar://10001085 3*f4a2713aSLionel Sambuc main()4*f4a2713aSLionel Sambucint main() { 5*f4a2713aSLionel Sambuc ^{ 6*f4a2713aSLionel Sambuc __attribute__((__blocks__(byref))) int index = ({ int __a; int __b; __a < __b ? __b : __a; }); 7*f4a2713aSLionel Sambuc }; 8*f4a2713aSLionel Sambuc } 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc // PR13229 11*f4a2713aSLionel Sambuc // rdar://11777609 12*f4a2713aSLionel Sambuc typedef struct {} Z; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc typedef int (^B)(Z); 15*f4a2713aSLionel Sambuc testPR13229()16*f4a2713aSLionel Sambucvoid testPR13229() { 17*f4a2713aSLionel Sambuc Z z1; 18*f4a2713aSLionel Sambuc B b1 = ^(Z z1) { return 1; }; 19*f4a2713aSLionel Sambuc b1(z1); 20*f4a2713aSLionel Sambuc } 21