From: Manuel Klimek Date: Tue, 3 Mar 2015 14:21:48 +0000 (+0000) Subject: Make sure we initialize all values in WhitespaceManager::Change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b570c13229d98aa8ef29352ca1e2a729a955e63;p=clang Make sure we initialize all values in WhitespaceManager::Change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231067 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Format/WhitespaceManager.cpp b/lib/Format/WhitespaceManager.cpp index fd5dd5991d..4896ad70b0 100644 --- a/lib/Format/WhitespaceManager.cpp +++ b/lib/Format/WhitespaceManager.cpp @@ -36,7 +36,9 @@ WhitespaceManager::Change::Change( PreviousLinePostfix(PreviousLinePostfix), CurrentLinePrefix(CurrentLinePrefix), Kind(Kind), ContinuesPPDirective(ContinuesPPDirective), IndentLevel(IndentLevel), - Spaces(Spaces) {} + Spaces(Spaces), IsTrailingComment(false), TokenLength(0), + PreviousEndOfTokenColumn(0), EscapedNewlineColumn(0), + StartOfBlockComment(nullptr), IndentationOffset(0) {} void WhitespaceManager::reset() { Changes.clear(); @@ -232,7 +234,6 @@ void WhitespaceManager::alignEscapedNewlines() { unsigned MaxEndOfLine = Style.AlignEscapedNewlinesLeft ? 0 : Style.ColumnLimit; unsigned StartOfMacro = 0; - Changes[0].EscapedNewlineColumn = 0; for (unsigned i = 1, e = Changes.size(); i < e; ++i) { Change &C = Changes[i]; if (C.NewlinesBefore > 0) {