зеркало из https://github.com/microsoft/clang-1.git
Implemented rewriting of invocation of a block ivar.
(radar 7482224). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91652 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
81a444a274
Коммит
e24b22bb58
|
@ -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
|
Загрузка…
Ссылка в новой задаче