xref: /minix3/external/bsd/llvm/dist/clang/test/Rewriter/weak_byref_objects.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fblocks -triple i386-apple-darwin9 -fobjc-gc -rewrite-objc -fobjc-runtime=macosx-fragile-10.5  %s -o -
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc#define nil 0
4*f4a2713aSLionel Sambucint main() {
5*f4a2713aSLionel Sambuc        __weak __block id foo = nil;
6*f4a2713aSLionel Sambuc        __block id foo2 = nil;
7*f4a2713aSLionel Sambuc        id foo3 = nil;
8*f4a2713aSLionel Sambuc
9*f4a2713aSLionel Sambuc        void (^myblock)() = ^{
10*f4a2713aSLionel Sambuc                foo = nil;
11*f4a2713aSLionel Sambuc                foo2 = nil;
12*f4a2713aSLionel Sambuc                [foo3 bar];
13*f4a2713aSLionel Sambuc                id foo4 = foo3;
14*f4a2713aSLionel Sambuc        };
15*f4a2713aSLionel Sambuc}
16