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

Method fullyApplyAliases

kdevplatform/language/duchain/ducontext.cpp:755–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753}
754
755QVector<QualifiedIdentifier> DUContext::fullyApplyAliases(const QualifiedIdentifier& id,
756 const TopDUContext* source) const
757{
758 ENSURE_CAN_READ
759
760 if (!source)
761 source = topContext();
762
763 SearchItem::PtrList identifiers;
764 identifiers << SearchItem::Ptr(new SearchItem(id));
765
766 const DUContext* current = this;
767 while (current) {
768 SearchItem::PtrList aliasedIdentifiers;
769 current->applyAliases(identifiers, aliasedIdentifiers, CursorInRevision::invalid(), true, false);
770 current->applyUpwardsAliases(identifiers, source);
771
772 current = current->parentContext();
773 }
774
775 QVector<QualifiedIdentifier> ret;
776 for (const SearchItem::Ptr& item : std::as_const(identifiers)) {
777 ret += item->toList();
778 }
779
780 return ret;
781}
782
783QList<Declaration*> DUContext::findDeclarations(const QualifiedIdentifier& identifier,
784 const CursorInRevision& position,

Callers 1

stripPrefixesFunction · 0.80

Calls 6

topContextFunction · 0.85
applyUpwardsAliasesMethod · 0.80
invalidFunction · 0.50
applyAliasesMethod · 0.45
parentContextMethod · 0.45
toListMethod · 0.45

Tested by

no test coverage detected