clang-format: Fix invalid write discovered by ASAN.

Introduced in r197900.

llvm-svn: 197906
This commit is contained in:
Daniel Jasper 2013-12-23 11:25:40 +00:00
parent ff7bde1582
commit 9a26e77311
1 changed files with 2 additions and 1 deletions

View File

@ -421,7 +421,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
// }];
// Thus, we set LastSpace of the next higher ParenLevel, to which we move
// when we consume all of the "}"'s FakeRParens at the "{".
State.Stack[State.Stack.size() - 2].LastSpace = ContinuationIndent;
if (State.Stack.size() > 1)
State.Stack[State.Stack.size() - 2].LastSpace = ContinuationIndent;
} else if (Current.Type == TT_CtorInitializerColon) {
State.Column = State.FirstIndent + Style.ConstructorInitializerIndentWidth;
} else if (Current.Type == TT_CtorInitializerComma) {