| 3489 | } |
| 3490 | |
| 3491 | static bool specMatch( |
| 3492 | const TemplateSimplifier::TokenAndName &spec, |
| 3493 | const TemplateSimplifier::TokenAndName &decl) |
| 3494 | { |
| 3495 | // make sure decl is really a declaration |
| 3496 | if (decl.isPartialSpecialization() || decl.isSpecialization() || decl.isAlias() || decl.isFriend()) |
| 3497 | return false; |
| 3498 | |
| 3499 | if (!spec.isSameFamily(decl)) |
| 3500 | return false; |
| 3501 | |
| 3502 | // make sure the scopes and names match |
| 3503 | if (spec.fullName() == decl.fullName()) { |
| 3504 | if (spec.isFunction()) { |
| 3505 | std::vector<const Token*> specArgs; |
| 3506 | std::vector<const Token*> declArgs; |
| 3507 | getFunctionArguments(spec.nameToken(), specArgs); |
| 3508 | getFunctionArguments(decl.nameToken(), declArgs); |
| 3509 | |
| 3510 | if (specArgs.size() == declArgs.size()) { |
| 3511 | // @todo make sure function parameters also match |
| 3512 | return true; |
| 3513 | } |
| 3514 | } else |
| 3515 | return true; |
| 3516 | } |
| 3517 | |
| 3518 | return false; |
| 3519 | } |
| 3520 | |
| 3521 | void TemplateSimplifier::getSpecializations() |
| 3522 | { |
no test coverage detected