Improve handling of decltype( in for loops

Simplify pattern macht and token selection

Improve handling of decltype( in for loops
This commit is contained in:
Daniel Friedrich 2020-08-16 21:11:18 +02:00
parent 160b8f0f17
commit f413c9cad8
1 changed files with 3 additions and 0 deletions

View File

@ -485,6 +485,9 @@ static Token * skipDecl(Token *tok)
} else if (Token::Match(vartok, "%var% [:=(]")) {
return vartok;
}
else if (Token::simpleMatch(vartok, "decltype (")) {
return vartok->linkAt(1)->next();
}
vartok = vartok->next();
}
return tok;