| 6783 | //--------------------------------------------------------------------------- |
| 6784 | |
| 6785 | void Tokenizer::addSemicolonAfterUnknownMacro() |
| 6786 | { |
| 6787 | if (!isCPP()) |
| 6788 | return; |
| 6789 | for (Token *tok = list.front(); tok; tok = tok->next()) { |
| 6790 | if (tok->str() != ")") |
| 6791 | continue; |
| 6792 | const Token *macro = tok->link() ? tok->link()->previous() : nullptr; |
| 6793 | if (!macro || !macro->isName()) |
| 6794 | continue; |
| 6795 | if (Token::simpleMatch(tok, ") try") && !Token::Match(macro, "if|for|while")) |
| 6796 | tok->insertToken(";"); |
| 6797 | else if (Token::simpleMatch(tok, ") using")) |
| 6798 | tok->insertToken(";"); |
| 6799 | } |
| 6800 | } |
| 6801 | //--------------------------------------------------------------------------- |
| 6802 | |
| 6803 | void Tokenizer::simplifyEmptyNamespaces() |
nothing calls this directly
no test coverage detected