aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteTest.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-01-23 20:34:40 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-01-23 20:34:40 +0000
commit7da8d94cb79f311c5b126483b8edfe5dc70d6c8f (patch)
treed8be384dc66ed142c10e0ae3eba1bce09d0dc620 /Driver/RewriteTest.cpp
parentab2b8c54bca82866876f91e756788916d3fa20c3 (diff)
Fixed a nasty bug which took a while to come up with a test case,
diagnose, and took even longer to fix. It has to do with rewriting of a message receiver which is an 'ivar' reference. Fix, however, is to remove a code which was not doing the right thing and no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r--Driver/RewriteTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp
index eca9349fb6..4a67be7f73 100644
--- a/Driver/RewriteTest.cpp
+++ b/Driver/RewriteTest.cpp
@@ -705,6 +705,10 @@ Stmt *RewriteTest::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) {
delete IV;
return Replacement;
} else {
+#if 0
+ /// This code is not right. It seems unnecessary. It breaks use of
+ /// ivar reference used as 'receiver' of an expression; as in:
+ /// [newInv->_container addObject:0];
if (CurMethodDecl) {
if (const PointerType *pType = IV->getBase()->getType()->getAsPointerType()) {
ObjCInterfaceType *intT = dyn_cast<ObjCInterfaceType>(pType->getPointeeType());
@@ -729,6 +733,7 @@ Stmt *RewriteTest::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) {
}
}
}
+#endif
return IV;
}
}