Tokenizer:simplifyKeyword(): Improved matching when the static keyword is removed.

This commit is contained in:
orbitcowboy 2014-05-13 16:47:55 +02:00
parent c1e37ff691
commit e3009bdd0b
1 changed files with 2 additions and 1 deletions

View File

@ -9268,10 +9268,11 @@ void Tokenizer::simplifyKeyword()
// simplify static keyword:
// void foo( int [ static 5 ] ); ==> void foo( int [ 5 ] );
if (Token::Match(tok, "[ static "))
if (Token::Match(tok, "[ static %num%")) {
tok->deleteNext();
}
}
}
if (_settings->standards.c >= Standards::C11) {
for (Token *tok = list.front(); tok; tok = tok->next()) {