From 322f4d3a6ef48a3ebf535789df031bf58566b137 Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Thu, 15 Nov 2007 00:00:21 +0000 Subject: [PATCH] Refinement to previous commit. Always cast the first argument to "id"...no need to special case self. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44149 91177308-0d34-0410-b5e6-96231b3b80d8 --- Driver/RewriteTest.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index c5c851b4ec..0f6c9741cd 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -1046,12 +1046,7 @@ Stmt *RewriteTest::RewriteMessageExpr(ObjCMessageExpr *Exp) { } else { // instance message. Expr *recExpr = Exp->getReceiver(); - // Make sure we cast "self" to "id". - if (DeclRefExpr *DRE = dyn_cast(recExpr)) { - if (!strcmp(DRE->getDecl()->getName(), "self")) - recExpr = new CastExpr(Context->getObjcIdType(), recExpr, - SourceLocation()); - } + recExpr = new CastExpr(Context->getObjcIdType(), recExpr, SourceLocation()); MsgExprs.push_back(recExpr); } // Create a call to sel_registerName("selName"), it will be the 2nd argument. -- 2.40.0