qdoc: allow 'void' function parameter without a parameter name

There are a few functions using a C-style function declaration:

    void foo(void);

meaning that foo() takes no parameters. This change allows this
for QDoc, making it successfully match documented \fn blocks
with the correct declaration, and not print out warnings.

Change-Id: I8191c55094371431b0e9c2ad22d19cadcb7facfb
Reviewed-by: Martin Smith <martin.smith@digia.com>
bb10
Topi Reinio 2015-08-25 12:59:25 +02:00 committed by Topi Reiniö
parent 191b7237bf
commit c3a0f22b60
1 changed files with 1 additions and 0 deletions

View File

@ -807,6 +807,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
QVector<Parameter>::ConstIterator p = func->parameters().constBegin();
while (p != func->parameters().constEnd()) {
if ((*p).name().isEmpty() && (*p).dataType() != QLatin1String("...")
&& (*p).dataType() != QLatin1String("void")
&& func->name() != QLatin1String("operator++")
&& func->name() != QLatin1String("operator--")) {
node->doc().location().warning(tr("Missing parameter name"));