diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-02-25 18:41:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 18:41:54 (GMT) |
commit | aba8e32396ce444904f2fd44cedeb5b998fd67a6 (patch) | |
tree | 7dae6596f371d22d364272b089b3b4f30f0ffa58 | |
parent | 97461bcbc6ca807d5c972b118249b6f6e677df88 (diff) | |
parent | f5a91767dc32230f7fc39d78d42d3f16a8961895 (diff) | |
download | Doxygen-aba8e32396ce444904f2fd44cedeb5b998fd67a6.zip Doxygen-aba8e32396ce444904f2fd44cedeb5b998fd67a6.tar.gz Doxygen-aba8e32396ce444904f2fd44cedeb5b998fd67a6.tar.bz2 |
Merge pull request #7613 from analizo/doxyparse-prototype
output on doxyparse if a function is a prototype
-rw-r--r-- | addon/doxyparse/doxyparse.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
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<MemberDef*>(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); } } |