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

Method findDeclarationsInternal

kdevplatform/language/duchain/topducontext.cpp:703–727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701};
702
703bool TopDUContext::findDeclarationsInternal(const SearchItem::PtrList& identifiers, const CursorInRevision& position,
704 const AbstractType::Ptr& dataType, DeclarationList& ret,
705 const TopDUContext* /*source*/, SearchFlags flags, uint /*depth*/) const
706{
707 ENSURE_CAN_READ
708
709#ifdef DEBUG_SEARCH
710 for (const SearchItem::Ptr& idTree : identifiers) {
711 const auto ids = idTree->toList();
712 for (const QualifiedIdentifier& id : ids) {
713 qCDebug(LANGUAGE) << "searching item" << id.toString();
714 }
715 }
716
717#endif
718
719 DeclarationChecker check(this, position, dataType, flags);
720 FindDeclarationsAcceptor storer(this, ret, check, flags);
721
722 ///The actual scopes are found within applyAliases, and each complete qualified identifier is given to FindDeclarationsAcceptor.
723 ///That stores the found declaration to the output.
724 applyAliases(identifiers, storer, position, false);
725
726 return true;
727}
728
729//This is used to prevent endless recursion due to "using namespace .." declarations, by storing all imports that are already being used.
730struct TopDUContext::ApplyAliasesBuddyInfo

Callers

nothing calls this directly

Calls 2

toListMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected