]> granicus.if.org Git - clang/commitdiff
RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
authorSteve Naroff <snaroff@apple.com>
Wed, 16 Jul 2008 22:35:27 +0000 (22:35 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 16 Jul 2008 22:35:27 +0000 (22:35 +0000)
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

Driver/RewriteObjC.cpp

index 9d093bc2ab574a0d8596d1a63e780ac6175aac49..80b5784bdfac98b3457aefa74e2974b5c0b8d58a 100644 (file)
@@ -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);