Page 1 of 1

Enh Rqst 3.5.1: function signature where argument list is empty

Posted: Fri Sep 13 2019 10:34 am
by marlowa
When a function takes no arguments doxypress generates a signature with (void). I think it should be empty parentheses, which is the modern C++ way. Clang-tidy gives a warning when one uses the redundant (void) form of signature, showing that this form really is out of date.

Re: Enh Rqst 3.5.1: function signature where argument list is empty

Posted: Fri Feb 28 2020 11:47 am
by marlowa
Hello everyone, I would really like to see some movement on this please. I am using clang-check/tidy more and more these days and I am not alone. The clang check is documented at https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html and I have changed alot of our code to cope. I hope to move from doxygen to doxpress at some point and it would be very disappointing if, when I do, I have to explain to junior developers that they should not say (void) and that if they do clang-check will flag it, but the documentation will still have it.

Re: Enh Rqst 3.5.1: function signature where argument list is empty

Posted: Fri Feb 28 2020 8:33 pm
by barbara
Please provide a working example so we can test DoxyPress and see how the documentation can be improved. Otherwise, we might change the program and believe your concern has been addressed.

Barbara

Re: Enh Rqst 3.5.1: function signature where argument list is empty

Posted: Sun Mar 22 2020 5:48 pm
by marlowa
barbara wrote:
Fri Feb 28 2020 8:33 pm
Please provide a working example so we can test DoxyPress and see how the documentation can be improved. Otherwise, we might change the program and believe your concern has been addressed.

Barbara
Here is a header file that shows the problem, using doxypress 1.3.7:

#ifndef INCLUDED_MYCLASS
#define INCLUDED_MYCLASS

class myclass
{
public:
int do_something();
int do_something_else(void);
};

#endif

The doxypress output shows the function signatures exactly as you see them in the header file, where do_something_else has the spurious void argument. I think that the void should be removed by doxypress.

While doing this test I noticed that doxypress still works with the installation directory by default rather than the current directory. Project files are saved there and loaded from there by default. I really think it should use the current working directory. I'm not sure if there's a ticket for that. Should I create one?