Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang doesn't know Doxygens retval tag

Tags:

c

clang

doxygen

I'm trying to compile a C file with clang 3.6 and -Weverything but it fails at my Doxygen comment which includes the \retval tag.

My code looks like this:

/***************************************************************************/
/** 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 I can disable the warning by supplying -Wno-documentation-unknown-command but I think that's not the best solution.

like image 517
Sven Avatar asked Aug 08 '14 06:08

Sven


1 Answers

As the comment says, you can use the option:

-fcomment-block-commands=retval

This will stop clang from complaining about the tag \retval.

like image 159
Allen Supynuk Avatar answered Oct 02 '22 05:10

Allen Supynuk