在Xcode中消除"文档问题"警告?

Ili*_*rim 13 documentation xcode warnings

例如 '@param' command used in a comment that is not attached to a function declaration

此警告有效,但是,我正在编译第三方代码,并希望不必更改原始源.

我正在运行Xcode 8.2.1.

小智 39

我能够通过去禁止这些警告

项目 - >构建设置 - > Apple LLVM 8.1 - 警告 - 所有语言,并将"文档注释"切换为.

(要查找设置,我在"构建设置"下的搜索框中键入"文档".)

  • 这不会使导入的SDK中的第三方文档沉默.我有一整套第三方文档警告与我的项目无关,所以我很想找到一种方法来沉默这些.有任何想法吗?谢谢. (6认同)
  • 我使用#pragma clang诊断忽略了“ -Wdocumentation” (2认同)

Cra*_*lds 5

这为我解决了这个问题,超越了仅在第三方库标头中的警告。#includes只需用这些s包装有问题的标头pragma

\n\n
#pragma clang diagnostic push\n#pragma clang diagnostic ignored "-Wdocumentation"\n#include <opencv2/core/core.hpp>\n#include <opencv2/highgui/highgui.hpp>\n#pragma clang diagnostic pop\n
Run Code Online (Sandbox Code Playgroud)\n\n

这是来自Konchog和 Vladimir Grigorov\xe2\x80\x99的提示的组合,这里的答案非常有用。

\n