r231067 - Make sure we initialize all values in WhitespaceManager::Change.
Manuel Klimek
klimek at google.com
Tue Mar 3 06:21:48 PST 2015
Author: klimek
Date: Tue Mar 3 08:21:48 2015
New Revision: 231067
URL: http://llvm.org/viewvc/llvm-project?rev=231067&view=rev
Log:
Make sure we initialize all values in WhitespaceManager::Change.
Modified:
cfe/trunk/lib/Format/WhitespaceManager.cpp
Modified: cfe/trunk/lib/Format/WhitespaceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/WhitespaceManager.cpp?rev=231067&r1=231066&r2=231067&view=diff
==============================================================================
--- cfe/trunk/lib/Format/WhitespaceManager.cpp (original)
+++ cfe/trunk/lib/Format/WhitespaceManager.cpp Tue Mar 3 08:21:48 2015
@@ -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::alignEscapedNewl
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) {
More information about the cfe-commits
mailing list