blob: 99e870f643a84e80f435895a456bb7fb88f79a75 [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// 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 Gibbs8e8fb3b2012-10-19 12:44:48 +00003// expected-no-diagnostics
John McCallf85e1932011-06-15 23:02:42 +00004
5struct X {
6 __unsafe_unretained id object;
7 int (^ __unsafe_unretained block)(int, int);
8};
9
10void f(struct X x) {
11 x.object = 0;
12 x.block = ^(int x, int y) { return x + y; };
13}