File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9542,14 +9542,14 @@ void Tokenizer::simplifyCPPAttribute()
95429542 Token* head = skipCPPOrAlignAttribute (tok)->next ();
95439543 while (isCPPAttribute (head) || isAlignAttribute (head))
95449544 head = skipCPPOrAlignAttribute (head)->next ();
9545- while (Token::Match (head->next (), " %name%|*|&|&&|const|static|inline|volatile" ))
9545+ while (head && Token::Match (head->next (), " %name%|*|&|&&|const|static|inline|volatile" ))
95469546 head = head->next ();
95479547 if (Token::Match (head, " %name%" ) && !Token::Match (head, " auto [" ))
95489548 head->isAttributeMaybeUnused (true );
95499549 else if (Token::Match (tok->previous (), " %name%" ) && Token::Match (tok->link (), " ] [;={]" )) {
95509550 tok->previous ()->isAttributeMaybeUnused (true );
95519551 } else {
9552- if (Token::simpleMatch (head->next (), " [" )) {
9552+ if (head && Token::simpleMatch (head->next (), " [" )) {
95539553 head = head->next ();
95549554 const Token *end = head->link ();
95559555 for (head = head->next (); end && head != end; head = head->next ()) {
You can’t perform that action at this time.
0 commit comments