diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-07 18:46:50 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-07 18:46:50 +0000 |
commit | a33849b368b0973e64ee9c49af4c080a59f99eb4 (patch) | |
tree | bdec609b9c1a1e36561e96bffea6d5eeadcdf2d4 | |
parent | b0e1e121b32a9a04b39f1b77b3068bce2f3be05a (diff) |
[arcmt] Fix handling NSMakeCollectable inside an objc method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143980 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/ARCMigrate/Transforms.cpp | 3 | ||||
-rw-r--r-- | test/ARCMT/GC.m | 4 | ||||
-rw-r--r-- | test/ARCMT/GC.m.result | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/lib/ARCMigrate/Transforms.cpp b/lib/ARCMigrate/Transforms.cpp index 86812a5f87..96c472c52f 100644 --- a/lib/ARCMigrate/Transforms.cpp +++ b/lib/ARCMigrate/Transforms.cpp @@ -302,6 +302,7 @@ namespace { class ASTTransform : public RecursiveASTVisitor<ASTTransform> { MigrationContext &MigrateCtx; + typedef RecursiveASTVisitor<ASTTransform> base; public: ASTTransform(MigrationContext &MigrateCtx) : MigrateCtx(MigrateCtx) { } @@ -315,7 +316,7 @@ public: E = MigrateCtx.traversers_end(); I != E; ++I) (*I)->traverseObjCImplementation(ImplCtx); - return true; + return base::TraverseObjCImplementationDecl(D); } bool TraverseStmt(Stmt *rootS) { diff --git a/test/ARCMT/GC.m b/test/ARCMT/GC.m index e49bca8fa3..28846792ad 100644 --- a/test/ARCMT/GC.m +++ b/test/ARCMT/GC.m @@ -66,4 +66,8 @@ __attribute__((objc_arc_weak_reference_unavailable)) @implementation I4Impl @synthesize pw1, pw2, ps, pds, pds2; + +-(void)test1:(CFTypeRef *)cft { + id x = NSMakeCollectable(cft); +} @end diff --git a/test/ARCMT/GC.m.result b/test/ARCMT/GC.m.result index 67a70e3dd2..aaa5ee5b56 100644 --- a/test/ARCMT/GC.m.result +++ b/test/ARCMT/GC.m.result @@ -61,4 +61,8 @@ __attribute__((objc_arc_weak_reference_unavailable)) @implementation I4Impl @synthesize pw1, pw2, ps, pds, pds2; + +-(void)test1:(CFTypeRef *)cft { + id x = CFBridgingRelease(cft); +} @end |