| 516 | } |
| 517 | |
| 518 | QList<Declaration*> DUChainUtils::overriders(const Declaration* currentClass, const Declaration* overriddenDeclaration, uint& maxAllowedSteps) { |
| 519 | QList<Declaration*> ret; |
| 520 | |
| 521 | if(maxAllowedSteps == 0) |
| 522 | return ret; |
| 523 | |
| 524 | if(currentClass != overriddenDeclaration->context()->owner() && currentClass->internalContext()) |
| 525 | ret += currentClass->internalContext()->findLocalDeclarations(overriddenDeclaration->identifier(), CursorInRevision::invalid(), currentClass->topContext(), overriddenDeclaration->abstractType()); |
| 526 | |
| 527 | const auto inheriters = DUChainUtils::inheriters(currentClass, maxAllowedSteps); |
| 528 | for (Declaration* inheriter : inheriters) { |
| 529 | ret += overriders(inheriter, overriddenDeclaration, maxAllowedSteps); |
| 530 | } |
| 531 | |
| 532 | return ret; |
| 533 | } |
| 534 | |
| 535 | static bool hasUse(DUContext* context, int usedDeclarationIndex) { |
| 536 | if(usedDeclarationIndex == std::numeric_limits<int>::max()) |
nothing calls this directly
no test coverage detected