summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Rewrite/RewriteModernObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/RewriteModernObjC.cpp b/clang/lib/Rewrite/RewriteModernObjC.cpp
index 63dfa561d3a..403ccd9c12d 100644
--- a/clang/lib/Rewrite/RewriteModernObjC.cpp
+++ b/clang/lib/Rewrite/RewriteModernObjC.cpp
@@ -6469,8 +6469,10 @@ Stmt *RewriteModernObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) {
ParenExpr *PE = new (Context) ParenExpr(SourceLocation(),
SourceLocation(),
addExpr);
+ QualType IvarT = D->getType();
+ convertBlockPointerToFunctionPointer(IvarT);
+ QualType castT = Context->getPointerType(IvarT);
- QualType castT = Context->getPointerType(D->getType());
castExpr = NoTypeInfoCStyleCastExpr(Context,
castT,
CK_BitCast,
OpenPOWER on IntegriCloud