clang-format: Fix invalid write discovered by ASAN.
Introduced in r197900. llvm-svn: 197906
This commit is contained in:
parent
ff7bde1582
commit
9a26e77311
|
@ -421,7 +421,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
|
||||||
// }];
|
// }];
|
||||||
// Thus, we set LastSpace of the next higher ParenLevel, to which we move
|
// Thus, we set LastSpace of the next higher ParenLevel, to which we move
|
||||||
// when we consume all of the "}"'s FakeRParens at the "{".
|
// 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) {
|
} else if (Current.Type == TT_CtorInitializerColon) {
|
||||||
State.Column = State.FirstIndent + Style.ConstructorInitializerIndentWidth;
|
State.Column = State.FirstIndent + Style.ConstructorInitializerIndentWidth;
|
||||||
} else if (Current.Type == TT_CtorInitializerComma) {
|
} else if (Current.Type == TT_CtorInitializerComma) {
|
||||||
|
|
Loading…
Reference in New Issue