John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks %s |
| 2 | // RUN: %clang_cc1 -fsyntax-only -verify -fblocks -fobjc-arc %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 3 | // expected-no-diagnostics |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 4 | |
| 5 | struct X { |
| 6 | __unsafe_unretained id object; |
| 7 | int (^ __unsafe_unretained block)(int, int); |
| 8 | }; |
| 9 | |
| 10 | void f(struct X x) { |
| 11 | x.object = 0; |
| 12 | x.block = ^(int x, int y) { return x + y; }; |
| 13 | } |