diff options
| author | John McCall <rjmccall@apple.com> | 2011-06-15 23:25:17 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-06-15 23:25:17 +0000 |
| commit | d70fb9812adbfa133be0c4348faa014c4f53f1c5 (patch) | |
| tree | e958f99ebbd6548f7e4c242202643f3f986c36c7 /clang/test/ARCMT/remove-dealloc-zerouts.m.result | |
| parent | 31168b077c3687bb79985102b08718cd77db353d (diff) | |
| download | bcm5719-llvm-d70fb9812adbfa133be0c4348faa014c4f53f1c5.tar.gz bcm5719-llvm-d70fb9812adbfa133be0c4348faa014c4f53f1c5.zip | |
The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this.
llvm-svn: 133104
Diffstat (limited to 'clang/test/ARCMT/remove-dealloc-zerouts.m.result')
| -rw-r--r-- | clang/test/ARCMT/remove-dealloc-zerouts.m.result | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/clang/test/ARCMT/remove-dealloc-zerouts.m.result b/clang/test/ARCMT/remove-dealloc-zerouts.m.result new file mode 100644 index 00000000000..ba93b3f0888 --- /dev/null +++ b/clang/test/ARCMT/remove-dealloc-zerouts.m.result @@ -0,0 +1,39 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result +// RUN: arcmt-test --args -arch x86_64 %s > %t +// RUN: diff %t %s.result + +@interface Foo +@property (retain) id x; +@property (retain) id y; +@property (retain) id w; +@property (retain) id z; +@property (strong) id q; +@end + +@implementation Foo +@synthesize x; +@synthesize y; +@synthesize w; +@synthesize q; +@dynamic z; + +- (void) dealloc { + self.z = 0; +} +@end + +@interface Bar +@property (retain) Foo *a; +- (void) setA:(Foo*) val; +- (id) a; +@end + +@implementation Bar +- (void) dealloc { + [self setA:0]; // This is user-defined setter overriding synthesize, don't touch it. + self.a.x = 0; // every dealloc must zero out its own ivar. This patter is not recognized. +} +@synthesize a; +- (void) setA:(Foo*) val { } +- (id) a {return 0;} +@end |

