With your new profile, the system is now finding scan-build
, but scan-build
cannot run without being able to find perl
. Your PATH
variable is preventing the system from finding perl
and xcodebuild
. If you want to add /Users/Kay/bin/clang to your path, do this in your profile instead:
export PATH="$PATH:$HOME/bin/clang"
This will append that path to the pre-existing search list.
Xcode can run the static analyzer for you. Open the project build settings, search for "analyzer", then check the checkbox next to "Run Clang static analyzer." The results are presented by Xcode both in the Details tab and as annotations on your project source code.
Also, note that the Clang static analyzer is exactly that: a static analyzer. It will not observe the dynamic, runtime behavior of your application. For that, you should use Instruments: within Xcode, go to Run > Run with Performance Tool > Leaks.