Fix uninitialized value bug found by valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181779 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/TokenAnnotator.h b/lib/Format/TokenAnnotator.h
index 5ea3015..227dd52 100644
--- a/lib/Format/TokenAnnotator.h
+++ b/lib/Format/TokenAnnotator.h
@@ -75,10 +75,11 @@
: 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); }