[cfe-commits] r94559 - in /cfe/trunk: clang.xcodeproj/project.pbxproj lib/Frontend/RewriteObjC.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Jan 26 10:28:51 PST 2010


Author: fjahanian
Date: Tue Jan 26 12:28:51 2010
New Revision: 94559

URL: http://llvm.org/viewvc/llvm-project?rev=94559&view=rev
Log:
Refix rewriting of an ivar access when it is
type-cast to its sub-class (radar 7575882).


Modified:
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/lib/Frontend/RewriteObjC.cpp

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=94559&r1=94558&r2=94559&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Tue Jan 26 12:28:51 2010
@@ -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;

Modified: cfe/trunk/lib/Frontend/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/RewriteObjC.cpp?rev=94559&r1=94558&r2=94559&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/RewriteObjC.cpp (original)
+++ cfe/trunk/lib/Frontend/RewriteObjC.cpp Tue Jan 26 12:28:51 2010
@@ -1213,8 +1213,7 @@
   ObjCIvarDecl *D = IV->getDecl();
   const Expr *BaseExpr = IV->getBase();
   if (CurMethodDef) {
-    if (BaseExpr->getType()->isObjCObjectPointerType() && 
-        isa<DeclRefExpr>(BaseExpr)) {
+    if (BaseExpr->getType()->isObjCObjectPointerType()) {
       ObjCInterfaceType *iFaceDecl =
         dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType());
       // lookup which class implements the instance variable.
@@ -4308,18 +4307,6 @@
                 TypeAsString.c_str(), TypeAsString.size());
     return;
   }
-  if (LangOpts.Microsoft && QT->isObjCObjectPointerType()) {
-    if (isa<ObjCInterfaceType>(QT->getPointeeType())) {
-      QualType ptee = QT->getAs<ObjCObjectPointerType>()->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;
 





More information about the cfe-commits mailing list