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

Method declaration

kdevplatform/language/duchain/functiondefinition.cpp:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38Declaration* FunctionDefinition::declaration(const TopDUContext* topContext) const
39{
40 ENSURE_CAN_READ
41
42 const KDevVarLengthArray<Declaration*> declarations = d_func()->m_declaration.declarations(
43 topContext ? topContext : this->topContext());
44
45 for (Declaration* decl : declarations) {
46 if (!dynamic_cast<FunctionDefinition*>(decl))
47 return decl;
48 }
49
50 return nullptr;
51}
52
53bool FunctionDefinition::hasDeclaration() const
54{

Callers

nothing calls this directly

Calls 2

declarationsMethod · 0.45
topContextMethod · 0.45

Tested by

no test coverage detected