aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-07-16 22:35:27 +0000
committerSteve Naroff <snaroff@apple.com>2008-07-16 22:35:27 +0000
commitf616ebb9b61239182a2ebc29bf3bd4f80530daab (patch)
tree8c84eea89f2badfd2aa2ce7bdf6b526ebe1aef5e
parent0ff12f078c70acad7ef18cb4906d17a203d2267a (diff)
RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53703 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Driver/RewriteObjC.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 9d093bc2ab..80b5784bdf 100644
--- a/Driver/RewriteObjC.cpp
+++ b/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);