Fix uninitialized value bug found by valgrind.

llvm-svn: 181779
This commit is contained in:
Daniel Jasper 2013-05-14 10:44:17 +00:00
parent cdd0662b4e
commit 8187c76db5
2 changed files with 5 additions and 6 deletions

View File

@ -874,8 +874,6 @@ void TokenAnnotator::annotate(AnnotatedLine &Line) {
Line.First.SpacesRequiredBefore = 1;
Line.First.MustBreakBefore = Line.First.FormatTok.MustBreakBefore;
Line.First.CanBreakBefore = Line.First.MustBreakBefore;
Line.First.TotalLength = Line.First.FormatTok.TokenLength;
}
void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) {

View File

@ -75,10 +75,11 @@ public:
: FormatTok(FormatTok), Type(TT_Unknown), SpacesRequiredBefore(0),
CanBreakBefore(false), MustBreakBefore(false),
ClosesTemplateDeclaration(false), MatchingParen(NULL),
ParameterCount(0), BindingStrength(0), SplitPenalty(0),
LongestObjCSelectorName(0), DefinesFunctionType(false), Parent(NULL),
FakeRParens(0), LastInChainOfCalls(false),
PartOfMultiVariableDeclStmt(false), NoMoreTokensOnLevel(false) {}
ParameterCount(0), TotalLength(FormatTok.TokenLength),
BindingStrength(0), SplitPenalty(0), LongestObjCSelectorName(0),
DefinesFunctionType(false), Parent(NULL), FakeRParens(0),
LastInChainOfCalls(false), PartOfMultiVariableDeclStmt(false),
NoMoreTokensOnLevel(false) {}
bool is(tok::TokenKind Kind) const { return FormatTok.Tok.is(Kind); }