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
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 9d093bc..80b5784 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -2061,7 +2061,10 @@
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);