diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-08 18:37:50 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-08 18:37:50 +0000 |
commit | da4ad9fa26b607adde033badcf67396ebc0cfe17 (patch) | |
tree | a5500105dfce3c87091676a5b84c900338c870c4 /lib/Rewrite/RewriteObjC.cpp | |
parent | 67dece7e8b38138dd07e3d461d675dd8c8b4e025 (diff) |
Fixes a rewrite bug, rewriting nested property usage
inside blocks. Fixes //rdar: //8608293.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | lib/Rewrite/RewriteObjC.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp index 5fff38859c..4e40b4effa 100644 --- a/lib/Rewrite/RewriteObjC.cpp +++ b/lib/Rewrite/RewriteObjC.cpp @@ -5524,7 +5524,12 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) { GetInnerBlockDeclRefExprs(BE->getBody(), InnerBlockDeclRefs, InnerContexts); // Rewrite the block body in place. + Stmt *SaveCurrentBody = CurrentBody; + CurrentBody = BE->getBody(); + PropParentMap = 0; RewriteFunctionBodyOrGlobalInitializer(BE->getBody()); + CurrentBody = SaveCurrentBody; + PropParentMap = 0; ImportedLocalExternalDecls.clear(); // Now we snarf the rewritten text and stash it away for later use. std::string Str = Rewrite.getRewrittenText(BE->getSourceRange()); |