首页 > 解决方案 > 如何使用 doxygen 中的静态数组索引说明符函数参数正确记录 C 数组?

问题描述

我有以下 C 函数,我想为它生成 doxygen 文档

//! Function description
/*!
    \param paramA[][] description
    \param paramB[] description
!*/

static void foo(
        int paramA[static const A_DIM1_SIZE][A_DIM2_SIZE],
        int paramB[static const B_DIM1_SIZE]);

Doxygen 给了我这个警告

warning: parameters of member foo are not (all) documented

我认为这个错误是由于static const数组括号内部造成的,因为我在我的代码库中用类似的 doxygen 语法记录了其他数组函数参数,static const它们的括号内没有,并且 doxygen 没有抱怨。

遗憾的是,我无法找到解释使用 doxygenstatic const在括号内记录数组时使用的正确语法的指南。

标签: cdoxygen

解决方案


推荐阅读