From c3c8affc0622c6d2d716c75bcf0a716671140fa2 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Mon, 15 Apr 2013 15:47:34 +0000 Subject: [PATCH] Fix unused variable warning with assertions disabled. llvm-svn: 179531 --- clang/lib/Format/Format.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index f93509e..c5e1052 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -660,9 +660,10 @@ private: Whitespaces); } TailOffset += Split.first + Split.second; - unsigned OldRemainingLength = RemainingLength; - RemainingLength = Token->getLineLengthAfterSplit(LineIndex, TailOffset); - assert(RemainingLength < OldRemainingLength); + unsigned NewRemainingLength = + Token->getLineLengthAfterSplit(LineIndex, TailOffset); + assert(NewRemainingLength < RemainingLength); + RemainingLength = NewRemainingLength; Penalty += Style.PenaltyExcessCharacter; BreakInserted = true; } -- 2.7.4