YouCompleteMe/cpp/llvm/tools/clang/test/SemaObjC/arc-unsafe_unretained.m
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

13 lines
329 B
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks %s
// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -fobjc-arc %s
struct X {
__unsafe_unretained id object;
int (^ __unsafe_unretained block)(int, int);
};
void f(struct X x) {
x.object = 0;
x.block = ^(int x, int y) { return x + y; };
}