Skip to content

Commit 4e928a8

Browse files
committed
issue #9552: False warning "@param documentation sections but no arguments" on using declarations/typedefs
1 parent 5fe8594 commit 4e928a8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/docparser.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ void DocParser::checkUnOrMultipleDocumentedParams()
373373
}
374374
else
375375
{
376-
if (!context.paramsFound.size() && Config_getBool(WARN_IF_DOC_ERROR))
376+
if (context.paramsFound.empty() && Config_getBool(WARN_IF_DOC_ERROR))
377377
{
378378
warn_doc_error(context.memberDef->docFile(),
379379
context.memberDef->docLine(),
@@ -1999,7 +1999,10 @@ IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf,
19991999
std::visit(PrintDocVisitor{},ast->root);
20002000
}
20012001

2002-
parser->checkUnOrMultipleDocumentedParams();
2002+
if (md && md->isFunction())
2003+
{
2004+
parser->checkUnOrMultipleDocumentedParams();
2005+
}
20032006
if (parser->context.memberDef) parser->context.memberDef->detectUndocumentedParams(parser->context.hasParamCommand,parser->context.hasReturnCommand);
20042007

20052008
// TODO: These should be called at the end of the program.

0 commit comments

Comments
 (0)