From 6e177d3155a183bf52b5eab8325f5c0326e93934 Mon Sep 17 00:00:00 2001 From: Matt Beaumont-Gay Date: Fri, 16 Mar 2012 22:20:39 +0000 Subject: [PATCH] sink variable into assert llvm-svn: 152955 --- clang/lib/Rewrite/RewriteModernObjC.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clang/lib/Rewrite/RewriteModernObjC.cpp b/clang/lib/Rewrite/RewriteModernObjC.cpp index d59fb43008d7..b10d64134b58 100644 --- a/clang/lib/Rewrite/RewriteModernObjC.cpp +++ b/clang/lib/Rewrite/RewriteModernObjC.cpp @@ -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; } -