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

Method hasUses

kdevplatform/language/duchain/declaration.cpp:742–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740}
741
742bool Declaration::hasUses() const
743{
744 ENSURE_CAN_READ
745 int idx = topContext()->indexForUsedDeclaration(const_cast<Declaration*>(this), false);
746 bool ret = idx != std::numeric_limits<int>::max() && (idx >= 0 || hasDeclarationUse(topContext(), idx)); //hasLocalUses
747 DeclarationId myId = id();
748
749 if (!ret && DUChain::uses()->hasUses(myId)) {
750 ret = true;
751 }
752
753 if (!ret && !myId.isDirect() && DUChain::uses()->hasUses(id(true))) {
754 ret = true;
755 }
756
757 return ret;
758}
759
760QMap<IndexedString, QVector<KTextEditor::Range>> Declaration::usesCurrentRevision() const
761{

Callers

nothing calls this directly

Calls 5

topContextFunction · 0.85
hasDeclarationUseFunction · 0.85
idFunction · 0.50
isDirectMethod · 0.45

Tested by

no test coverage detected