XCode and Clang Static Analyzer
First, check out clang static analyzer.
To get it running form Xcode make a new “Shell Script Target,” call it “Clang,” and for it’s “script build phase” put this in it:
/usr/bin/scan-build -V xcodebuild -configuration $CONFIGURATION
This is assuming the scan-build tool is in /usr/bin/, change the path if you need to. Now, change your build target to Clang, and build it. All it does is run the script, which will in turn build the project for your configuration (usually debug or release). And, if clang finds any problems, it will automatically open your browser to show you the output, if no problems are present, it’s just a successful build.
No comments yet. Be the first.
Leave a reply