Clang doesn't know retolesgens retval tag

I am trying to compile a C file with clang 3.6 and -Weverything , but it does not work in my Doxygen comment, which includes the \retval tag.

My code is as follows:

 /***************************************************************************/ /** Main Function. * * This function represents the main functionality. * * \retval 0 successful * \retval other failed */ int main( int argc, /**< argument count */ char **argv /**< argument list */ ) { ... return 0; } 

When I try to compile it with clang, I get the following warning.

 $> clang-3.6 -Wall -Weverything -Werror -o main main.c main.c:31:4: error: unknown command tag name [-Werror,-Wdocumentation-unknown-command] * \retval 0 successful ^ 

I know that I can turn off the warning by providing -Wno-documentation-unknown-command , but I think this is not the best solution.

+6
source share
1 answer

As the comment says, you can use this option:

 -fcomment-block-commands=retval 

This will stop complaining about the \ retval tag.

+1
source

Source: https://habr.com/ru/post/973525/


All Articles