| 876 | } |
| 877 | |
| 878 | template<class T, REQUIRES("T must be a Token class", std::is_convertible<T*, const Token*> )> |
| 879 | static T* getInitTokImpl(T* tok) |
| 880 | { |
| 881 | if (!tok) |
| 882 | return nullptr; |
| 883 | if (Token::Match(tok, "%name% (")) |
| 884 | return getInitTokImpl(tok->next()); |
| 885 | if (tok->str() != "(") |
| 886 | return nullptr; |
| 887 | if (!Token::simpleMatch(tok->astOperand2(), ";")) |
| 888 | return nullptr; |
| 889 | if (Token::simpleMatch(tok->astOperand2()->astOperand1(), ";")) |
| 890 | return nullptr; |
| 891 | return tok->astOperand2()->astOperand1(); |
| 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) |
no test coverage detected