diff options
Diffstat (limited to 'clang/lib/Format/FormatToken.cpp')
-rw-r--r-- | clang/lib/Format/FormatToken.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp index badb3a39c82..0addbfed0ce 100644 --- a/clang/lib/Format/FormatToken.cpp +++ b/clang/lib/Format/FormatToken.cpp @@ -59,7 +59,8 @@ void TokenRole::precomputeFormattingInfos(const FormatToken *Token) {} unsigned CommaSeparatedList::formatAfterToken(LineState &State, ContinuationIndenter *Indenter, bool DryRun) { - if (!State.NextToken->Previous || !State.NextToken->Previous->Previous) + if (State.NextToken == nullptr || !State.NextToken->Previous || + !State.NextToken->Previous->Previous) return 0; // Ensure that we start on the opening brace. |