forked from OSchip/llvm-project
__typeof should be able to handle block pointer types when
rewriting. Fixes radar 7659483. llvm-svn: 96549
This commit is contained in:
parent
e5ad57a3ed
commit
f50679151b
|
@ -4416,7 +4416,7 @@ void RewriteObjC::RewriteCastExpr(CStyleCastExpr *CE) {
|
|||
const TypeOfExprType *TypeOfExprTypePtr = cast<TypeOfExprType>(TypePtr);
|
||||
QT = TypeOfExprTypePtr->getUnderlyingExpr()->getType();
|
||||
std::string TypeAsString = "(";
|
||||
TypeAsString += QT.getAsString();
|
||||
RewriteBlockPointerType(TypeAsString, QT);
|
||||
TypeAsString += ")";
|
||||
ReplaceText(LocStart, endBuf-startBuf+1, TypeAsString);
|
||||
return;
|
||||
|
|
|
@ -27,3 +27,9 @@ static void y(int (^cmp)(int, int)) {
|
|||
x(cmp);
|
||||
});
|
||||
}
|
||||
|
||||
// radar 7659483
|
||||
void *_Block_copy(const void *aBlock);
|
||||
void x(void (^block)(void)) {
|
||||
block = ((__typeof(block))_Block_copy((const void *)(block)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue