summaryrefslogtreecommitdiffstats
path: root/lib/Format/WhitespaceManager.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2015-03-03 14:21:48 +0000
committerManuel Klimek <klimek@google.com>2015-03-03 14:21:48 +0000
commit6b570c13229d98aa8ef29352ca1e2a729a955e63 (patch)
tree2ebccffba9671a831397a86f873e41cd25b86ce1 /lib/Format/WhitespaceManager.cpp
parentace92c4e2bb94f3f8914588c94a91fe93c75d42f (diff)
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
Diffstat (limited to 'lib/Format/WhitespaceManager.cpp')
-rw-r--r--lib/Format/WhitespaceManager.cpp5
1 files changed, 3 insertions, 2 deletions
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) {