| 2514 | } |
| 2515 | |
| 2516 | bool findTypeInBase(const std::string &scope) const { |
| 2517 | if (scope.empty()) |
| 2518 | return false; |
| 2519 | // check in base types first |
| 2520 | if (baseTypes.find(scope) != baseTypes.end()) |
| 2521 | return true; |
| 2522 | // check in base types base types |
| 2523 | for (const std::string & base : baseTypes) { |
| 2524 | const ScopeInfo3 * baseScope = findScope(base); |
| 2525 | // bail on uninstantiated recursive template |
| 2526 | if (baseScope == this) |
| 2527 | return false; |
| 2528 | if (baseScope && baseScope->fullName == scope) |
| 2529 | return true; |
| 2530 | if (baseScope && baseScope->findTypeInBase(scope)) |
| 2531 | return true; |
| 2532 | } |
| 2533 | return false; |
| 2534 | } |
| 2535 | |
| 2536 | ScopeInfo3 * findScope(const ScopeInfo3 * scope) { |
| 2537 | if (scope->bodyStart == bodyStart) |
no test coverage detected