This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSPM0G3507:在 CCS 20.3 中使用 Clang-tidy

Guru**** 2673945 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1591469/mspm0g3507-using-clang-tidy-in-ccs-20-3

器件型号: MSPM0G3507

当我们在 Clang-tidy Settings 中启用任何检查时、错误数会爆炸。 列出的 erros 在整个代码中随机出现。

image.png

image.png

如何在 CCS 20.3 中正确设置 CLANG-tidy 是否有任何配置?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    将重新分配给 SDTO 团队寻求帮助、谢谢!

    此致、
    彼得

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    _static_inline 是一个可能在 SDK 中定义的宏、并且不被 clang-tidy 拾取、因此出现了错误。 您可以在编译器定义中显式定义它。 另一个选项是在.clang-tidy 文件中定义该工程。 对于后者、您需要使用 CCS 20.4.0(早期的 CCS 版本不支持.clang-tidy 文件)。

    谢谢

    Ki