| Fariborz Jahanian | b50801f | 2011-08-23 00:27:49 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | 
| 2 | // rdar://10001085 | ||||
| 3 | |||||
| 4 | int main() { | ||||
| 5 | ^{ | ||||
| 6 | __attribute__((__blocks__(byref))) int index = ({ int __a; int __b; __a < __b ? __b : __a; }); | ||||
| 7 | }; | ||||
| 8 | } | ||||
| Fariborz Jahanian | d487941 | 2012-06-30 00:48:59 +0000 | [diff] [blame] | 9 | |
| 10 | // PR13229 | ||||
| 11 | // rdar://11777609 | ||||
| 12 | typedef struct {} Z; | ||||
| 13 | |||||
| 14 | typedef int (^B)(Z); | ||||
| 15 | |||||
| 16 | void testPR13229() { | ||||
| 17 | Z z1; | ||||
| 18 | B b1 = ^(Z z1) { return 1; }; | ||||
| 19 | b1(z1); | ||||
| 20 | } | ||||