c - Doxygen:如何重新定义 void

标签 c doxygen

我使用了一个重新定义 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/

相关文章:

c - Doxygen 的页面跨多个评论 block

documentation - 减少 doxygen 文档中的文件数量

c - 在C中一次读取一个字段的二进制文件

c - 声明临时结构作为参数传递——结构被重写。如何在新的内存位置声明该结构?

c - Posix 线程程序

c - C 中的 strcat 函数

多个分隔符的代码核算不起作用

c++ - 团体成员的个人身份

java - 带有自定义注释的 Doxygen

inline - 仅用于一个文件或一个函数的 doxygen 内联源