| 7186 | } |
| 7187 | |
| 7188 | void Tokenizer::simplifyPointerToStandardType() |
| 7189 | { |
| 7190 | if (!isC()) |
| 7191 | return; |
| 7192 | |
| 7193 | for (Token *tok = list.front(); tok; tok = tok->next()) { |
| 7194 | if (!Token::Match(tok, "& %name% [ 0 ] !![")) |
| 7195 | continue; |
| 7196 | |
| 7197 | if (!Token::Match(tok->previous(), "[,(=]")) |
| 7198 | continue; |
| 7199 | |
| 7200 | // Remove '[ 0 ]' suffix |
| 7201 | Token::eraseTokens(tok->next(), tok->tokAt(5)); |
| 7202 | // Remove '&' prefix |
| 7203 | tok = tok->previous(); |
| 7204 | if (!tok) |
| 7205 | break; |
| 7206 | tok->deleteNext(); |
| 7207 | } |
| 7208 | } |
| 7209 | |
| 7210 | void Tokenizer::simplifyFunctionPointers() |
| 7211 | { |
nothing calls this directly
no test coverage detected