Summary:
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8212
Reviewers: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47191
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332961
91177308-0d34-0410-b5e6-
96231b3b80d8
break;
if (!End->Next->closesScope())
continue;
- if (End->Next->MatchingParen->isOneOf(tok::l_brace,
- TT_ArrayInitializerLSquare,
- tok::less)) {
+ if (End->Next->MatchingParen &&
+ End->Next->MatchingParen->isOneOf(
+ tok::l_brace, TT_ArrayInitializerLSquare, tok::less)) {
const ParenState *State = FindParenState(End->Next->MatchingParen);
if (State && State->BreakBeforeClosingBrace)
break;