Doxygen:如何重新定义 void

Doxygen: How to redefine void

我使用了一个重新定义 void 类型(以及其他类型)的库:

#define XX_VOID void

所以当我 运行 doxygen 像

这样的代码时
/**
 * @brief Function description
 */
XX_VOID foo(XX_VOID)
{
    /*...*/
}

我收到警告

file.c:10: warning: return type of member foo is not documented

我如何告诉 Doxygen XX_VOID 无效,所以没有 return 值?

您可以尝试使用 MACRO_EXPANSION 标签:

MACRO_EXPANSION

If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names in the source code. If set to NO, only conditional compilation will be performed. Macro expansion can be done in a controlled way by setting EXPAND_ONLY_PREDEF to YES.

The default value is: NO.

This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

MACRO_EXPANSION设置为YESdoxygen预处理后的结果变为:

void foo(void)
{
  /* ... */
}