[arcmt] Fix handling NSMakeCollectable inside an objc method.

llvm-svn: 143980
This commit is contained in:
Argyrios Kyrtzidis 2011-11-07 18:46:50 +00:00
parent 722d21c646
commit d569791c44
3 changed files with 10 additions and 1 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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