MCPcopy Create free account
hub / github.com/KDE/kdevelop / overriders

Method overriders

kdevplatform/language/duchain/duchainutils.cpp:518–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518QList<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
535static bool hasUse(DUContext* context, int usedDeclarationIndex) {
536 if(usedDeclarationIndex == std::numeric_limits<int>::max())

Callers

nothing calls this directly

Calls 8

findLocalDeclarationsMethod · 0.80
invalidFunction · 0.50
ownerMethod · 0.45
contextMethod · 0.45
internalContextMethod · 0.45
identifierMethod · 0.45
topContextMethod · 0.45
abstractTypeMethod · 0.45

Tested by

no test coverage detected