| 892 | } |
| 893 | |
| 894 | template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )> |
| 895 | static T* getStepTokImpl(T* tok) |
| 896 | { |
| 897 | if (!tok) |
| 898 | return nullptr; |
| 899 | if (Token::Match(tok, "%name% (")) |
| 900 | return getStepTokImpl(tok->next()); |
| 901 | if (tok->str() != "(") |
| 902 | return nullptr; |
| 903 | if (!Token::simpleMatch(tok->astOperand2(), ";")) |
| 904 | return nullptr; |
| 905 | if (!Token::simpleMatch(tok->astOperand2()->astOperand2(), ";")) |
| 906 | return nullptr; |
| 907 | return tok->astOperand2()->astOperand2()->astOperand2(); |
| 908 | } |
| 909 | |
| 910 | Token* getCondTok(Token* tok) |
| 911 | { |
no test coverage detected