我使用了一个重新定义 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
是无效的,所以没有返回值?
最佳答案
您可以尝试使用 MACRO_EXPANSION
标签:
MACRO_EXPANSION
If the
MACRO_EXPANSION
tag is set toYES
, doxygen will expand all macro names in the source code. If set toNO
, only conditional compilation will be performed. Macro expansion can be done in a controlled way by settingEXPAND_ONLY_PREDEF
toYES
.The default value is:
NO
.This tag requires that the tag
ENABLE_PREPROCESSING
is set toYES
.
将 MACRO_EXPANSION
设置为 YES
doxygen 预处理后的结果变为:
void foo(void)
{
/* ... */
}
关于c - Doxygen:如何重新定义 void,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31069112/