diff options
author | Daniel Jasper <djasper@google.com> | 2013-01-29 15:15:59 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-01-29 15:15:59 +0000 |
commit | b3109e35d75a543d167906384347c017812e5dbf (patch) | |
tree | 0f638c6d968c86b575ed000497fd2710718c0758 /lib/Format/Format.cpp | |
parent | a52d278f0fbac83fa26a03948759cce467d8e55b (diff) |
Fix uninitialized error caused by r173801.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index f6d7ec42f3..a8599dfbeb 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -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]); } |