]> granicus.if.org Git - clang/commitdiff
Fix uninitialized error caused by r173801.
authorDaniel Jasper <djasper@google.com>
Tue, 29 Jan 2013 15:15:59 +0000 (15:15 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 29 Jan 2013 15:15:59 +0000 (15:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173803 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/Format.cpp

index f6d7ec42f3fefb186472e550a437c04079eaa151..a8599dfbeb666b1e829987588b2917bd00084054 100644 (file)
@@ -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]);
   }