summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-29 15:15:59 +0000
committerDaniel Jasper <djasper@google.com>2013-01-29 15:15:59 +0000
commit85f16f946218b172ff96dec4a89778ccacc4e4c1 (patch)
treebbc4968edf33f3cab1b55751e5dfa7b7288a99fd /clang/lib/Format/Format.cpp
parent0942e0b5e17f05858fa6fbca37496e4f7e714668 (diff)
downloadbcm5719-llvm-85f16f946218b172ff96dec4a89778ccacc4e4c1.tar.gz
bcm5719-llvm-85f16f946218b172ff96dec4a89778ccacc4e4c1.zip
Fix uninitialized error caused by r173801.
llvm-svn: 173803
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index f6d7ec42f3f..a8599dfbeb6 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/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]);
}
OpenPOWER on IntegriCloud