diff options
Diffstat (limited to 'test/PCH/no-escaping-block-tail-calls.h')
-rw-r--r-- | test/PCH/no-escaping-block-tail-calls.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/PCH/no-escaping-block-tail-calls.h b/test/PCH/no-escaping-block-tail-calls.h new file mode 100644 index 0000000000000..5d37d904795e1 --- /dev/null +++ b/test/PCH/no-escaping-block-tail-calls.h @@ -0,0 +1,16 @@ +typedef int (^BlockTy)(void); + +struct S0 { + int a; +}; + +struct S { + int i; + void func(BlockTy __attribute__((noescape))); + int foo(S0 &); + + void m() { + __block S0 x; + func(^{ return foo(x); }); + } +}; |