diff options
-rw-r--r-- | clang/Driver/RewriteObjC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/Driver/RewriteObjC.cpp b/clang/Driver/RewriteObjC.cpp index 9d093bc2ab5..80b5784bdfa 100644 --- a/clang/Driver/RewriteObjC.cpp +++ b/clang/Driver/RewriteObjC.cpp @@ -2061,7 +2061,10 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) { InitExprs.push_back( new CastExpr(Context->getObjCIdType(), - recExpr, SourceLocation())); // set the 'receiver'. + new DeclRefExpr(CurMethodDecl->getSelfDecl(), + Context->getObjCIdType(), + SourceLocation()), + SourceLocation())); // set the 'receiver'. llvm::SmallVector<Expr*, 8> ClsExprs; QualType argType = Context->getPointerType(Context->CharTy); |