aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-26 18:28:51 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-26 18:28:51 +0000
commit8f0954309eb885891908ecdfbb06d720c63128ed (patch)
tree156d4c074982bf073644b1bbd1d94d577e3d7cd3 /lib/Frontend/RewriteObjC.cpp
parentce2ae88f834c740a28b7e074a4477039918f9bb0 (diff)
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
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r--lib/Frontend/RewriteObjC.cpp15
1 files changed, 1 insertions, 14 deletions
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<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 @@ void RewriteObjC::RewriteCastExpr(CStyleCastExpr *CE) {
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;