| 6585 | } |
| 6586 | |
| 6587 | void Tokenizer::removeExtraTemplateKeywords() |
| 6588 | { |
| 6589 | if (isCPP()) { |
| 6590 | for (Token *tok = list.front(); tok; tok = tok->next()) { |
| 6591 | if (Token::Match(tok, "%name%|>|) .|:: template %name%")) { |
| 6592 | tok->next()->deleteNext(); |
| 6593 | Token* templateName = tok->tokAt(2); |
| 6594 | while (Token::Match(templateName, "%name%|::")) { |
| 6595 | templateName->isTemplate(true); |
| 6596 | templateName = templateName->next(); |
| 6597 | } |
| 6598 | if (!templateName) |
| 6599 | syntaxError(tok); |
| 6600 | if (Token::Match(templateName->previous(), "operator %op%|(")) { |
| 6601 | templateName->isTemplate(true); |
| 6602 | if (templateName->str() == "(" && templateName->link()) |
| 6603 | templateName->link()->isTemplate(true); |
| 6604 | } |
| 6605 | } |
| 6606 | } |
| 6607 | } |
| 6608 | } |
| 6609 | |
| 6610 | static std::string getExpression(const Token *tok) |
| 6611 | { |