1 // RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o %t -fblocks
9 // Verify that attributes on blocks are set correctly.
15 // RUN: grep 'internal void @__f2_block_invoke_0(.struct.s0\* sret .*, .*, .* byval .*)' %t
16 struct s0
f2(struct s0 a0
) {
17 return ^(struct s0 a1
){ return a1
; }(a0
);
20 // This should not crash: rdar://6808051
25 void (^test1
)(void) = ^(void) {
30 typedef double ftype(double);
31 // It's not clear that we *should* support this syntax, but until that decision
32 // is made, we should support it properly and not crash.
33 ftype
^test2
= ^ftype
{
37 // rdar://problem/8605032
38 void f3_helper(void (^)(void));
41 f3_helper(^{ if (b
) {} });