From: Fariborz Jahanian Date: Tue, 26 Jan 2010 18:28:51 +0000 (+0000) Subject: Refix rewriting of an ivar access when it is X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f0954309eb885891908ecdfbb06d720c63128ed;p=clang Refix rewriting of an ivar access when it is type-cast to its sub-class (radar 7575882). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94559 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index d1cd032ec0..41986dc3e1 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -1037,6 +1037,7 @@ 356EF9B30C8F7DCA006650F5 /* Analysis */ = { isa = PBXGroup; children = ( + DE67E70A0C020EC500F66BC5 /* SemaType.cpp */, 35544B840F5C7F9D00D92AA9 /* Path-Sensitive */, 3507E4CC0E27FEB900FB7B57 /* Flow-Sensitive Analyses */, 3507E4C30E27FE3800FB7B57 /* Checks */, @@ -1265,7 +1266,6 @@ BDF87CF60FD746F300BBF872 /* SemaTemplateDeduction.cpp */, 35544B8B0F5C803200D92AA9 /* SemaTemplateInstantiate.cpp */, 1ADF47AE0F782C3200E48A8A /* SemaTemplateInstantiateDecl.cpp */, - DE67E70A0C020EC500F66BC5 /* SemaType.cpp */, 1AE4EE3B103B89CA00888A23 /* TreeTransform.h */, ); name = Sema; diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp index e473adbf9e..fbd68569ff 100644 --- a/lib/Frontend/RewriteObjC.cpp +++ b/lib/Frontend/RewriteObjC.cpp @@ -1213,8 +1213,7 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV, ObjCIvarDecl *D = IV->getDecl(); const Expr *BaseExpr = IV->getBase(); if (CurMethodDef) { - if (BaseExpr->getType()->isObjCObjectPointerType() && - isa(BaseExpr)) { + if (BaseExpr->getType()->isObjCObjectPointerType()) { ObjCInterfaceType *iFaceDecl = dyn_cast(BaseExpr->getType()->getPointeeType()); // lookup which class implements the instance variable. @@ -4308,18 +4307,6 @@ void RewriteObjC::RewriteCastExpr(CStyleCastExpr *CE) { TypeAsString.c_str(), TypeAsString.size()); return; } - if (LangOpts.Microsoft && QT->isObjCObjectPointerType()) { - if (isa(QT->getPointeeType())) { - QualType ptee = QT->getAs()->getPointeeType(); - std::string TypeAsString = "(struct "; - TypeAsString += ptee.getAsString(); - TypeAsString += "_IMPL *"; - TypeAsString += ")"; - ReplaceText(LocStart, endBuf-startBuf+1, - TypeAsString.c_str(), TypeAsString.size()); - return; - } - } // advance the location to startArgList. const char *argPtr = startBuf;