forked from OSchip/llvm-project
[clang-format] Remove unnecessary non-null check and assert instead. NFC.
After a non-eof token, there is at least an eof token.
This commit is contained in:
parent
7a9e3ef77a
commit
bb1b53da6e
|
@ -514,9 +514,10 @@ bool UnwrappedLineParser::parseLevel(bool HasOpeningBrace, IfStmtKind *IfKind) {
|
|||
FormatToken *Next;
|
||||
do {
|
||||
Next = Tokens->getNextToken();
|
||||
assert(Next);
|
||||
} while (Next->is(tok::comment));
|
||||
FormatTok = Tokens->setPosition(StoredPosition);
|
||||
if (Next && Next->isNot(tok::colon)) {
|
||||
if (Next->isNot(tok::colon)) {
|
||||
// default not followed by ':' is not a case label; treat it like
|
||||
// an identifier.
|
||||
parseStructuralElement();
|
||||
|
|
Loading…
Reference in New Issue