Is it possible to suppress Xcode 4 static analyzer warnings?

前端 未结 4 742
广开言路
广开言路 2020-12-04 15:57

The Xcode 4 static analyzer reports in my code some false positives. Is there any way to suppress them?

4条回答
  •  悲哀的现实
    2020-12-04 16:15

    Take a look at this page which shows how to use several #defines to annotate objective-c methods and parameters to help the static analyzer (clang) do the right thing

    http://clang-analyzer.llvm.org/annotations.html

    From that page:

    The Clang frontend supports several source-level annotations in the form of GCC-style attributes and pragmas that can help make using the Clang Static Analyzer more useful. These annotations can both help suppress false positives as well as enhance the analyzer's ability to find bugs.

提交回复
热议问题