From f5a91767dc32230f7fc39d78d42d3f16a8961895 Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Mon, 24 Feb 2020 15:14:01 -0300 Subject: output on doxyparse if a function is a prototype issue #5618 --- addon/doxyparse/doxyparse.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 59b560f..515d2ba 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -154,6 +154,9 @@ static void printDefinition(std::string type, std::string signature, int line) { static void printProtection(std::string protection) { printf(" protection: %s\n", protection.c_str()); } +static void printPrototypeYes() { + printf(" prototype: yes\n"); +} static void printNumberOfLines(int lines) { printf(" lines_of_code: %d\n", lines); } @@ -295,6 +298,12 @@ void functionInformation(MemberDef* md) { } } +void prototypeInformation(MemberDef* md) { + printPrototypeYes(); + const ArgumentList &argList = md->argumentList(); + printNumberOfArguments(argList.size()); +} + static void lookupSymbol(Definition *d) { if (d->definitionType() == Definition::TypeMember) { MemberDef *md = dynamic_cast(d); @@ -304,7 +313,10 @@ static void lookupSymbol(Definition *d) { if (md->protection() == Public) { printProtection("public"); } - if (md->isFunction()) { + if (md->isFunction() && md->isPrototype()) { + prototypeInformation(md); + } + else if (md->isFunction()) { functionInformation(md); } } -- cgit v0.12