From 6514d87c1aa5b544d02c3822fe41217e2051673d Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 8 Jun 2009 15:36:55 +0000 Subject: Import Clang r73070. --- lib/Frontend/RewriteBlocks.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Frontend/RewriteBlocks.cpp') diff --git a/lib/Frontend/RewriteBlocks.cpp b/lib/Frontend/RewriteBlocks.cpp index 9d73d90..8393574 100644 --- a/lib/Frontend/RewriteBlocks.cpp +++ b/lib/Frontend/RewriteBlocks.cpp @@ -1011,9 +1011,7 @@ Stmt *RewriteBlocks::RewriteFunctionBody(Stmt *S) { CI != E; ++CI) if (*CI) { if (BlockExpr *CBE = dyn_cast(*CI)) { - Stmt *newStmt = RewriteFunctionBody(CBE->getBody()); - if (newStmt) - *CI = newStmt; + RewriteFunctionBody(CBE->getBody()); // We've just rewritten the block body in place. // Now we snarf the rewritten text and stash it away for later use. @@ -1023,9 +1021,7 @@ Stmt *RewriteBlocks::RewriteFunctionBody(Stmt *S) { // Do the rewrite, using S.size() which contains the rewritten size. ReplaceText(CBE->getLocStart(), S.size(), Init.c_str(), Init.size()); } else { - Stmt *newStmt = RewriteFunctionBody(*CI); - if (newStmt) - *CI = newStmt; + RewriteFunctionBody(*CI); } } // Handle specific things. -- cgit v1.1