Is it possible to suppress Xcode 4 static analyzer warnings?

前端 未结 4 741
广开言路
广开言路 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:10

    I found a solution: false positives (like the Apple singleton design pattern) can be avoided with:

    #ifndef __clang_analyzer__
    
    // Code not to be analyzed
    
    #endif
    

    Analyzer will not analyze the code between those preprocessor directives.

提交回复
热议问题