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

Method findDeclarations

kdevplatform/language/duchain/ducontext.cpp:783–803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783QList<Declaration*> DUContext::findDeclarations(const QualifiedIdentifier& identifier,
784 const CursorInRevision& position,
785 const AbstractType::Ptr& dataType,
786 const TopDUContext* topContext, SearchFlags flags) const
787{
788 ENSURE_CAN_READ
789
790 DeclarationList ret;
791 // optimize: we don't want to allocate the top node always
792 // so create it on stack but ref it so its not deleted by the smart pointer
793 SearchItem item(identifier);
794 item.ref.ref();
795
796 SearchItem::PtrList identifiers{SearchItem::Ptr(&item)};
797
798 findDeclarationsInternal(identifiers,
799 position.isValid() ? position : range().end, dataType, ret,
800 topContext ? topContext : this->topContext(), flags, 0);
801
802 return ret;
803}
804
805bool DUContext::imports(const DUContext* origin, const CursorInRevision& /*position*/) const
806{

Callers 15

resolveMethod · 0.80
overriddenMethod · 0.80
newUseMethod · 0.80
openTypeFromNameMethod · 0.80
ContextTestFunction · 0.80
dataMethod · 0.80
findDeclarationMethod · 0.80
testMoveIntoSourceMethod · 0.80
testCommentsMethod · 0.80

Calls 4

topContextMethod · 0.95
rangeFunction · 0.85
refMethod · 0.80
isValidMethod · 0.45

Tested by 11

ContextTestFunction · 0.64
testMoveIntoSourceMethod · 0.64
testCommentsMethod · 0.64
testTemplateMethod · 0.64
testNamespaceMethod · 0.64
testAutoTypeDeductionMethod · 0.64
testExternCMethod · 0.64
testFunctionMethod · 0.64