gpt4 book ai didi

c - Doxygen:如何重新定义 void

转载 作者:太空宇宙 更新时间:2023-11-03 23:46:37 25 4
gpt4 key购买 nike

我使用了一个重新定义 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 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 设置为 YES doxygen 预处理后的结果变为:

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

关于c - Doxygen:如何重新定义 void,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31069112/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com