diff options
| author | Manuel Klimek <klimek@google.com> | 2015-03-03 14:21:48 +0000 |
|---|---|---|
| committer | Manuel Klimek <klimek@google.com> | 2015-03-03 14:21:48 +0000 |
| commit | 2d293400950ac0c72c18d31e54f70716830b6e67 (patch) | |
| tree | 6170189df2f1d9d7cd381e1f10b96349a94a70cb | |
| parent | 0391e556507af6a77770a5484783c5a470386283 (diff) | |
| download | bcm5719-llvm-2d293400950ac0c72c18d31e54f70716830b6e67.tar.gz bcm5719-llvm-2d293400950ac0c72c18d31e54f70716830b6e67.zip | |
Make sure we initialize all values in WhitespaceManager::Change.
llvm-svn: 231067
| -rw-r--r-- | clang/lib/Format/WhitespaceManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index fd5dd5991da..4896ad70b01 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/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) { |

