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

Function allUses

kdevplatform/language/duchain/ducontext.cpp:1508–1522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1506}
1507
1508QVector<RangeInRevision> allUses(DUContext* context, int declarationIndex, bool noEmptyUses)
1509{
1510 QVector<RangeInRevision> ret;
1511 for (int a = 0; a < context->usesCount(); ++a)
1512 if (context->uses()[a].m_declarationIndex == declarationIndex)
1513 if (!noEmptyUses || !context->uses()[a].m_range.isEmpty())
1514 ret << context->uses()[a].m_range;
1515
1516 const auto childContexts = context->childContexts();
1517 for (DUContext* child : childContexts) {
1518 ret += allUses(child, declarationIndex, noEmptyUses);
1519 }
1520
1521 return ret;
1522}
1523
1524DUContext::SearchItem::SearchItem(const QualifiedIdentifier& id, const Ptr& nextItem, int start)
1525 : isExplicitlyGlobal(start == 0 ? id.explicitlyGlobal() : false)

Callers 3

usesMethod · 0.70
usesCurrentRevisionMethod · 0.70
switchUseMethod · 0.50

Calls 4

childContextsMethod · 0.80
usesCountMethod · 0.45
usesMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected