| 1413 | } |
| 1414 | |
| 1415 | bool TemplateSimplifier::instantiateMatch(const Token *instance, const std::size_t numberOfArguments, bool variadic, const char patternAfter[]) |
| 1416 | { |
| 1417 | assert(instance->strAt(1) == "<"); |
| 1418 | |
| 1419 | auto n = templateParameters(instance->next()); |
| 1420 | if (variadic ? (n + 1 < numberOfArguments) : (numberOfArguments != n)) |
| 1421 | return false; |
| 1422 | |
| 1423 | if (patternAfter) { |
| 1424 | const Token *tok = instance->next()->findClosingBracket(); |
| 1425 | if (!tok || !Token::Match(tok->next(), patternAfter)) |
| 1426 | return false; |
| 1427 | } |
| 1428 | |
| 1429 | // nothing mismatching was found.. |
| 1430 | return true; |
| 1431 | } |
| 1432 | |
| 1433 | // Utility function for TemplateSimplifier::getTemplateNamePosition, that works on template functions |
| 1434 | bool TemplateSimplifier::getTemplateNamePositionTemplateFunction(const Token *tok, int &namepos) |
nothing calls this directly
no test coverage detected