[cfe-commits] r143980 - in /cfe/trunk: lib/ARCMigrate/Transforms.cpp test/ARCMT/GC.m test/ARCMT/GC.m.result

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Nov 7 10:46:50 PST 2011


Author: akirtzidis
Date: Mon Nov  7 12:46:50 2011
New Revision: 143980

URL: http://llvm.org/viewvc/llvm-project?rev=143980&view=rev
Log:
[arcmt] Fix handling NSMakeCollectable inside an objc method.

Modified:
    cfe/trunk/lib/ARCMigrate/Transforms.cpp
    cfe/trunk/test/ARCMT/GC.m
    cfe/trunk/test/ARCMT/GC.m.result

Modified: cfe/trunk/lib/ARCMigrate/Transforms.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/Transforms.cpp?rev=143980&r1=143979&r2=143980&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/Transforms.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/Transforms.cpp Mon Nov  7 12:46:50 2011
@@ -302,6 +302,7 @@
 
 class ASTTransform : public RecursiveASTVisitor<ASTTransform> {
   MigrationContext &MigrateCtx;
+  typedef RecursiveASTVisitor<ASTTransform> base;
 
 public:
   ASTTransform(MigrationContext &MigrateCtx) : MigrateCtx(MigrateCtx) { }
@@ -315,7 +316,7 @@
            E = MigrateCtx.traversers_end(); I != E; ++I)
       (*I)->traverseObjCImplementation(ImplCtx);
 
-    return true;
+    return base::TraverseObjCImplementationDecl(D);
   }
 
   bool TraverseStmt(Stmt *rootS) {

Modified: cfe/trunk/test/ARCMT/GC.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/GC.m?rev=143980&r1=143979&r2=143980&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/GC.m (original)
+++ cfe/trunk/test/ARCMT/GC.m Mon Nov  7 12:46:50 2011
@@ -66,4 +66,8 @@
 
 @implementation I4Impl
 @synthesize pw1, pw2, ps, pds, pds2;
+
+-(void)test1:(CFTypeRef *)cft {
+  id x = NSMakeCollectable(cft);
+}
 @end

Modified: cfe/trunk/test/ARCMT/GC.m.result
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/GC.m.result?rev=143980&r1=143979&r2=143980&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/GC.m.result (original)
+++ cfe/trunk/test/ARCMT/GC.m.result Mon Nov  7 12:46:50 2011
@@ -61,4 +61,8 @@
 
 @implementation I4Impl
 @synthesize pw1, pw2, ps, pds, pds2;
+
+-(void)test1:(CFTypeRef *)cft {
+  id x = CFBridgingRelease(cft);
+}
 @end





More information about the cfe-commits mailing list