diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-14 23:31:39 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-10-14 23:31:39 +0000 |
commit | f2c6fa4eca6e4d3b2a005416746a47e85690f3a7 (patch) | |
tree | 5a710f8d8fc47ec287ce75ba92a1b7c7cfb7cc04 /lib/Rewrite/RewriteObjC.cpp | |
parent | 3d5aff5d3036b0ff09d114857cd2276134b3d8c9 (diff) |
Rewrite bug fix rewriting a property assignment when
its RHS is an ivar. Fixes //rdar: //8541517.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | lib/Rewrite/RewriteObjC.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp index 8532bc7f13..4c929a246b 100644 --- a/lib/Rewrite/RewriteObjC.cpp +++ b/lib/Rewrite/RewriteObjC.cpp @@ -5479,6 +5479,12 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) { // ^(NSURL *errorURL, NSError *error) { return (BOOL)1; }; SourceRange SrcRange = BinOp->getSourceRange(); Stmt *newStmt = RewriteFunctionBodyOrGlobalInitializer(BinOp->getRHS()); + // Need to rewrite the ivar access expression if need be. + if (isa<ObjCIvarRefExpr>(newStmt)) { + bool replaced = false; + newStmt = RewriteObjCNestedIvarRefExpr(newStmt, replaced); + } + DisableReplaceStmt = false; // // Unlike the main iterator, we explicily avoid changing 'BinOp'. If |