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

Method argumentContext

kdevplatform/language/duchain/duchainutils.cpp:424–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424KDevelop::DUContext* DUChainUtils::argumentContext(KDevelop::Declaration* decl) {
425 DUContext* internal = decl->internalContext();
426 if( !internal )
427 return nullptr;
428 if( internal->type() == DUContext::Function )
429 return internal;
430 const auto importedParentContexts = internal->importedParentContexts();
431 for (const DUContext::Import& ctx : importedParentContexts) {
432 if( ctx.context(decl->topContext()) )
433 if( ctx.context(decl->topContext())->type() == DUContext::Function )
434 return ctx.context(decl->topContext());
435 }
436 return nullptr;
437}
438
439QList<IndexedDeclaration> DUChainUtils::collectAllVersions(Declaration* decl) {
440 const auto indexedDecl = IndexedDeclaration(decl);

Callers

nothing calls this directly

Calls 5

internalContextMethod · 0.45
typeMethod · 0.45
contextMethod · 0.45
topContextMethod · 0.45

Tested by

no test coverage detected