diff options
author | Alexander Kornienko <alexfh@google.com> | 2013-04-15 15:47:34 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2013-04-15 15:47:34 +0000 |
commit | e2657dd7aa2d5a41355f56c8dbb2104c6bf60648 (patch) | |
tree | b88243d19082855e20ab518abc89ffe7d6255a97 /lib/Format/Format.cpp | |
parent | 64fe1bb1a511a3228c01e12b4264acecfd2e4e92 (diff) |
Fix unused variable warning with assertions disabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index f93509e18c..c5e1052ce9 100644 --- a/lib/Format/Format.cpp +++ b/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; } |