Skip to content

Commit f233103

Browse files
Update tokenize.cpp
1 parent a5bc2f9 commit f233103

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/tokenize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9542,6 +9542,8 @@ void Tokenizer::simplifyCPPAttribute()
95429542
Token* head = skipCPPOrAlignAttribute(tok)->next();
95439543
while (isCPPAttribute(head) || isAlignAttribute(head))
95449544
head = skipCPPOrAlignAttribute(head)->next();
9545+
if (!head)
9546+
syntaxError(tok);
95459547
head->isAttributeMaybeUnused(true);
95469548
} else if (Token::findsimplematch(tok->tokAt(2), "unused", tok->link())) {
95479549
Token* head = skipCPPOrAlignAttribute(tok)->next();

0 commit comments

Comments
 (0)