r173803 - Fix uninitialized error caused by r173801.
Daniel Jasper
djasper at google.com
Tue Jan 29 07:15:59 PST 2013
Author: djasper
Date: Tue Jan 29 09:15:59 2013
New Revision: 173803
URL: http://llvm.org/viewvc/llvm-project?rev=173803&view=rev
Log:
Fix uninitialized error caused by r173801.
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=173803&r1=173802&r2=173803&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Tue Jan 29 09:15:59 2013
@@ -1234,8 +1234,9 @@ public:
Current.TotalLength =
Current.Parent->TotalLength + Current.FormatTok.TokenLength +
(Current.SpaceRequiredBefore ? 1 : 0);
- if (Current.CanBreakBefore)
- Current.SplitPenalty = splitPenalty(Current);
+ // FIXME: Only calculate this if CanBreakBefore is true once static
+ // initializers etc. are sorted out.
+ Current.SplitPenalty = splitPenalty(Current);
if (!Current.Children.empty())
calculateExtraInformation(Current.Children[0]);
}
More information about the cfe-commits
mailing list