| 422 | } |
| 423 | |
| 424 | KDevelop::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 | |
| 439 | QList<IndexedDeclaration> DUChainUtils::collectAllVersions(Declaration* decl) { |
| 440 | const auto indexedDecl = IndexedDeclaration(decl); |
nothing calls this directly
no test coverage detected