| 331 | } |
| 332 | |
| 333 | Declaration* DUChainUtils::declarationForDefinition(Declaration* definition, TopDUContext* topContext) |
| 334 | { |
| 335 | if(!definition) |
| 336 | return nullptr; |
| 337 | |
| 338 | if(!topContext) |
| 339 | topContext = definition->topContext(); |
| 340 | |
| 341 | if(dynamic_cast<FunctionDefinition*>(definition)) { |
| 342 | Declaration* ret = static_cast<FunctionDefinition*>(definition)->declaration(); |
| 343 | if(ret) |
| 344 | return ret; |
| 345 | } |
| 346 | |
| 347 | return definition; |
| 348 | } |
| 349 | |
| 350 | Declaration* DUChainUtils::declarationInLine(const KTextEditor::Cursor& _cursor, DUContext* ctx) { |
| 351 | if(!ctx) |
nothing calls this directly
no test coverage detected