On Wed, Aug 26, 2015 at 2:41 PM, Christoph Lipka <christ...@lipka-koeln.de> wrote: > Am 26.08.2015 um 11:14 schrieb Bostjan Mihoric: >> On Tue, Aug 25, 2015 at 7:14 PM, Christoph Lipka >> <christ...@lipka-koeln.de> wrote: >>> Am 25.08.2015 um 18:36 schrieb Bostjan Mihoric: >>> [...] >>> >>> /// @file >>> >>> /// My typedef. >>> typedef void VOID; >>> >>> /// My simple function. Details. >>> extern VOID Function(VOID); >>> [...] > [...] >> Agreed, at least when JAVADOC_AUTOBRIEF is specifically enabled it >> should work like that. But what I still don't understand, why does >> Doxygen then not emit warnings? Surely, having just a brief >> description does not also mean "and ignore parameters and return >> type"? > > That might depend on whether you have "|WARN_IF_DOC_ERROR" and/or > "|||WARN_NO_PARAMDOC" |enabled. (Also, make sure you don't have > "EXTRACT_ALL" enabled.)| >
I have it exactly as you put it - all warnings are enabled (including those two) and EXTRACT_ALL is disabled (NO). >> And why does the VOID redefine not work? > > It appears that Doxygen's strategy for warning about undocumented > parameters or return types just doesn't expect anyone to ever typedef > any other type as "void", and thus doesn't bother to test whether the > return type and/or sole parameter's type is _equivalent_ with "void", > but rather just tests whether it _is_ "void". > > This can be considered a bug, or it can be considered a feature: If you > do indeed want to indicate that your function does not return anything > at all, then why by all means do you not simply use the keyword "void" > (or leave the parameter list empty in case of C++)? On the other hand, > there might be cases where you may want some function to take or return > a parameter of a type that may or may not be configured to hold an > actual value (like, say, a type representing an error code, which may be > configured to be equivalent to "void" in an environment where other > means of error signalling, like throwing an exception, is used). In > that case, you'd probably want Doxygen to warn you if you forget to > document that return value or parameter, even if it _may_ be configured > to be equivalent to "void" by default. > Yes, I agree that anything but "void" should be considered a different type. What I meant is, why doesn't it work when I try to use Doxygen's preprocessor to redefine "VOID" back to "void". Surely it doesn't preprocess *after* deciding if function has a return value / parameters? If it's preprocessor replaced "VOID" with "void", why doesn't it then see it as "void"? > > ------------------------------------------------------------------------------ > _______________________________________________ > Doxygen-users mailing list > Doxygen-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/doxygen-users ------------------------------------------------------------------------------ _______________________________________________ Doxygen-users mailing list Doxygen-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/doxygen-users