================
@@ -1444,7 +1444,8 @@ WhitespaceManager::CellDescriptions
WhitespaceManager::getCells(unsigned Start,
} else if (C.Tok->is(tok::comma)) {
if (!Cells.empty())
Cells.back().EndIndex = i;
- if (C.Tok->getNextNonComment()->isNot(tok::r_brace)) // dangling comma
+ const FormatToken *Next = C.Tok->getNextNonComment();
+ if (Next && Next->isNot(tok::r_brace)) // dangling comma
++Cell;
----------------
owenca wrote:
```suggestion
if (const auto *Next = C.Tok->getNextNonComment();
Next && Next->isNot(tok::r_brace)) { // dangling comma
++Cell;
}
```
https://github.com/llvm/llvm-project/pull/77045
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits