[cfe-commits] r92868 - /cfe/trunk/test/Rewriter/weak_byref_objects.m
Fariborz Jahanian
fjahanian at apple.com
Wed Jan 6 15:31:34 PST 2010
Author: fjahanian
Date: Wed Jan 6 17:31:34 2010
New Revision: 92868
URL: http://llvm.org/viewvc/llvm-project?rev=92868&view=rev
Log:
Test case for rewriting of __weak byref objects.
Added:
cfe/trunk/test/Rewriter/weak_byref_objects.m
Added: cfe/trunk/test/Rewriter/weak_byref_objects.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/weak_byref_objects.m?rev=92868&view=auto
==============================================================================
--- cfe/trunk/test/Rewriter/weak_byref_objects.m (added)
+++ cfe/trunk/test/Rewriter/weak_byref_objects.m Wed Jan 6 17:31:34 2010
@@ -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;
+ };
+}
More information about the cfe-commits
mailing list