Implemented rewriting of invocation of a block ivar.
(radar 7482224). llvm-svn: 91652
This commit is contained in:
		
							parent
							
								
									cb0efecd33
								
							
						
					
					
						commit
						6ab7ed40c7
					
				| 
						 | 
				
			
			@ -4060,6 +4060,8 @@ Stmt *RewriteObjC::SynthesizeBlockCall(CallExpr *Exp, const Expr *BlockExp) {
 | 
			
		|||
                                      SourceLocation(), cast<Expr>(RHSStmt), 
 | 
			
		||||
                                      Exp->getType());
 | 
			
		||||
    return CondExpr;
 | 
			
		||||
  } else if (const ObjCIvarRefExpr *IRE = dyn_cast<ObjCIvarRefExpr>(BlockExp)) {
 | 
			
		||||
    CPT = IRE->getType()->getAs<BlockPointerType>();
 | 
			
		||||
  } else {
 | 
			
		||||
    assert(1 && "RewriteBlockClass: Bad type");
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
// RUN: %clang_cc1 -x objective-c++ -fblocks -rewrite-objc -o - %s
 | 
			
		||||
 | 
			
		||||
@interface Foo {
 | 
			
		||||
    void (^_block)(void);
 | 
			
		||||
}
 | 
			
		||||
@end
 | 
			
		||||
 | 
			
		||||
@implementation Foo
 | 
			
		||||
- (void)bar {
 | 
			
		||||
    _block();
 | 
			
		||||
}
 | 
			
		||||
@end
 | 
			
		||||
		Loading…
	
		Reference in New Issue