Silencing “Documentation issue” warnings in Xcode?

前端 未结 2 1039
既然无缘
既然无缘 2020-12-30 03:27

E.g. \'@param\' command used in a comment that is not attached to a function declaration

This warning is valid, however, I am compiling 3rd party code a

相关标签:
2条回答
  • 2020-12-30 04:20

    I was able to suppress these warnings by going to

    Project -> Build Settings -> Apple LLVM 8.1 - Warnings - All Languages, and switching the "Documentation Comments" to No.

    (To find the setting, I typed "Documentation" into the search box under Build Settings.)

    0 讨论(0)
  • 2020-12-30 04:22

    This solved it for me, surpassing the warnings only in the third party library headers. Just wrap the problematic header #includes with these pragmas:

    #pragma clang diagnostic push
    #pragma clang diagnostic ignored "-Wdocumentation"
    #include <opencv2/core/core.hpp>
    #include <opencv2/highgui/highgui.hpp>
    #pragma clang diagnostic pop
    

    this is a combination of a hint from Konchog and Vladimir Grigorov’s super helpful answer here.

    0 讨论(0)
提交回复
热议问题