diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-01-06 23:31:34 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-01-06 23:31:34 +0000 |
| commit | 017a6067e5831f3343b103a968183b3e00bbfa6f (patch) | |
| tree | be7ddd1cf32d39fa6f6d7b862fe3a26910430118 /clang/test | |
| parent | 03e8bdc07e8ec067a3a518727b5bad4507504ecf (diff) | |
| download | bcm5719-llvm-017a6067e5831f3343b103a968183b3e00bbfa6f.tar.gz bcm5719-llvm-017a6067e5831f3343b103a968183b3e00bbfa6f.zip | |
Test case for rewriting of __weak byref objects.
llvm-svn: 92868
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Rewriter/weak_byref_objects.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Rewriter/weak_byref_objects.m b/clang/test/Rewriter/weak_byref_objects.m new file mode 100644 index 00000000000..509cb4d57b4 --- /dev/null +++ b/clang/test/Rewriter/weak_byref_objects.m @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fblocks -rewrite-objc %s -o - + +#define nil 0 +int main() { + __weak __block id foo = nil; + __block id foo2 = nil; + id foo3 = nil; + + void (^myblock)() = ^{ + foo = nil; + foo2 = nil; + [foo3 bar]; + id foo4 = foo3; + }; +} |

