summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Utzig <fabio.utzig@nordicsemi.no>2020-12-17 15:51:35 (GMT)
committerFabio Utzig <fabio.utzig@nordicsemi.no>2020-12-17 15:51:35 (GMT)
commitd34236ba40379847ad4ee3140366bee37b652615 (patch)
tree3301ba7d9fa1b3c50ed0a9509b544ef0e8443880
parent736557cabb38a37f12cb630adca9ef693646a980 (diff)
downloadDoxygen-d34236ba40379847ad4ee3140366bee37b652615.zip
Doxygen-d34236ba40379847ad4ee3140366bee37b652615.tar.gz
Doxygen-d34236ba40379847ad4ee3140366bee37b652615.tar.bz2
Add param validation to typedef function pointers
Currently typedef'd function pointers, typically used as callbacks, don't have their `@param` documentation properly validated. This commit adds a proper check by initializing their memberdef with the parsed args. To avoid duplicating the params in the output, since typedef's already have the params in their definition, an extra check was added. Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/memberdef.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index e246628..e2ab088 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -2351,7 +2351,7 @@ static MemberDef *addVariableToFile(
type,name,args,0,
root->protection, Normal,root->stat,Member,
mtype,!root->tArgLists.empty() ? root->tArgLists.back() : ArgumentList(),
- ArgumentList(), root->metaData) };
+ root->argList, root->metaData) };
md->setTagInfo(root->tagInfo());
md->setMemberSpecifiers(root->spec);
md->setDocumentation(root->doc,root->docFile,root->docLine);
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index ca6026e..ecc07d7 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -845,7 +845,7 @@ static bool writeDefArgumentList(OutputList &ol,const Definition *scope,const Me
const ArgumentList &defArgList=(md->isDocsForDefinition()) ?
md->argumentList() : md->declArgumentList();
//printf("writeDefArgumentList '%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
- if (!defArgList.hasParameters() || md->isProperty())
+ if (!defArgList.hasParameters() || md->isProperty() || md->isTypedef())
{
return FALSE; // member has no function like argument list
}