Implemented rewriting of invocation of a block ivar.

(radar 7482224).
 

llvm-svn: 91652
This commit is contained in:
Fariborz Jahanian 2009-12-18 01:15:21 +00:00
parent cb0efecd33
commit 6ab7ed40c7
2 changed files with 14 additions and 0 deletions

View File

@ -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");
}

View File

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