| 5954 | } |
| 5955 | |
| 5956 | static std::string getTypeString(const Token *typeToken) |
| 5957 | { |
| 5958 | if (!typeToken) |
| 5959 | return ""; |
| 5960 | while (Token::Match(typeToken, "%name%|*|&|::")) { |
| 5961 | if (typeToken->str() == "::") { |
| 5962 | std::string ret; |
| 5963 | while (Token::Match(typeToken, ":: %name%")) { |
| 5964 | ret += "::" + typeToken->strAt(1); |
| 5965 | typeToken = typeToken->tokAt(2); |
| 5966 | if (typeToken->str() == "<") { |
| 5967 | for (const Token *tok = typeToken; tok != typeToken->link(); tok = tok->next()) |
| 5968 | ret += tok->str(); |
| 5969 | ret += ">"; |
| 5970 | typeToken = typeToken->link()->next(); |
| 5971 | } |
| 5972 | } |
| 5973 | return ret; |
| 5974 | } |
| 5975 | if (Token::Match(typeToken, "%name% const| %var%|*|&")) { |
| 5976 | return typeToken->str(); |
| 5977 | } |
| 5978 | typeToken = typeToken->next(); |
| 5979 | } |
| 5980 | return ""; |
| 5981 | } |
| 5982 | |
| 5983 | static bool hasMatchingConstructor(const Scope* classScope, const ValueType* argType) { |
| 5984 | if (!classScope || !argType) |
no test coverage detected