sink variable into assert

llvm-svn: 152955
This commit is contained in:
Matt Beaumont-Gay 2012-03-16 22:20:39 +00:00
parent c40b0f72bb
commit 6e177d3155
1 changed files with 2 additions and 3 deletions

View File

@ -1717,8 +1717,8 @@ Stmt *RewriteModernObjC::RewriteObjCSynchronizedStmt(ObjCAtSynchronizedStmt *S)
ReplaceText(rparenLoc, 1, buf);
SourceLocation startRBraceLoc = S->getSynchBody()->getLocEnd();
const char *startRBraceBuf = SM->getCharacterData(startRBraceLoc);
assert((*startRBraceBuf == '}') && "bogus @synchronized block");
assert((*SM->getCharacterData(startRBraceLoc) == '}') &&
"bogus @synchronized block");
buf = "} catch (id e) {_rethrow = e;}\n";
Write_RethrowObject(buf);
@ -6644,4 +6644,3 @@ Stmt *RewriteModernObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV) {
ReplaceStmtWithRange(IV, Replacement, OldRange);
return Replacement;
}