Using an external Xcode Clang binary static analyzer with additional checks

Im using Xcode 3.2.4 and installing the Clang Static Analyzer function to use the newer binary build, as described here: http://clang-analyzer.llvm.org/xcode.html

(Basically, the set-xcode-analyzer command-line utility is used to modify the copy of the static analyzer that Xcode uses to build and analyze).

I cannot specify how to set this binary code to use additional checks, such as -analyzer-check-objc-missing-dealloc when using binary code through Xcode, as described here: http://loufranco.com/blog/files/ scan-build-better-than-build-analyze.html and in scan-build --help.

    AVAILABLE ANALYSES (multiple analyses may be specified):

 (+) -analyzer-check-dead-stores
     -analyzer-check-llvm-conventions
 (+) -analyzer-check-objc-mem
 (+) -analyzer-check-objc-methodsigs
     -analyzer-check-objc-missing-dealloc
 (+) -analyzer-check-objc-unused-ivars
 (+) -analyzer-check-security-syntactic

 NOTE: "(+)" indicates that an analysis is enabled by default unless one
       or more analysis options are specified

Xcode?

+2
2

, , - Target Build Info, set-xcode-analyzer.

CC, , ( , /bin/clang ):

CC = /Path/To/Folder/With/Clang/checker-244/bin/clang

" " , :

WARNING_CFLAGS = -Xanalyzer -analyzer-check-llvm-conventions -Xanalyzer -analyzer-check-objc-missing-dealloc

-Xanalyzer, , .

: Mac OS X.

, Xcode, , , .

+6

(Xcode 4)

Xcode , :

WARNING_CFLAGS = "-Xanalyzer -analyzer-check-llvm-conventions -analyzer-check-objc-missing-dealloc"

NB: , XAnalyzer.

0

Source: https://habr.com/ru/post/1761728/


All Articles