Skip to content

False warning "@param documentation sections but no arguments" on using declarations/typedefs #9552

Closed
@Optimierungswerfer

Description

@Optimierungswerfer

Describe the bug
A false warning

Example.h:3 warning: FunctionSignature has @param documentation sections but no arguments

is being raised. It is false, because the function signature below clearly has arguments. This happens only with function signatures in typedefs/using declarations and not with "regular" function declarations (see example below).
The output HTML still lists the whole function signature under typedefs as well as the respective param documentation (with the exception that the argument of the typedef/using lacks the syntax highlighting of the argument in the regular function).

Expected behavior
No warning being raised.

To Reproduce
The example below illustrates the issue. EmptyArgumentListIssueExample.zip contains the Doxyfile that was used and this example code.

// Example.h

/**
* A using declaration of a function signature with a parameter raises a warning about trying to document an argument when there are no arguments in the signature allegedly.
* @param argument I'm valid! :(
*/
using FunctionSignature = void (*) (int argument /* notice me :c */);

/**
* In a regular function declaration Doxygen detects the argument list perfectly fine and raises no warning. 
* @param argument I'm valid! :)
*/
void functionDeclaration(int argument);

Version
1.9.5 (2f6875a) on Windows 10 (64 Bit)

Additional context
Pull Request #9496 added this warning in case the argument list IS empty (-> else-block), so that is where the symptom originates from. The underlying issue, however, must be deeper somewhere in the evaluation of argument lists, because in the attached example, the argument list should not be empty and thus the else-block that handles empty argument lists should not have been entered in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions