Snow Leopard and Static Code Analysis in Xcode

Posted on: by: skumancer

I’ve been enjoying Snow Leopard for a while. While developing my current application for the iPhone, I’ve been taking full advantage of Clang/LLVM’s static analysis. I’ve found it to be and indispensable tool now. I’ve been able to identify at least 20 memory leaks and other random bugs just by doing a “Build and Analyze”.

As John Siracusa puts it in his review of Snow Leopard:

I’m sure Apple is going hog-wild running the static analyzer on all of its applications and the operating system itself. The prospect of an automated way to discover bugs that may have existed for years in the depths of a huge codebase is almost pornographic to developers—platform owners in particular. To the degree that Mac OS X 10.6.0 is more bug-free than the previous 10.x.0 releases, LLVM surely deserves some significant part of the credit.

These were my exact thoughts when I first witnessed the power of the mighty tool.
For further info, check Ars Technica’s review of Snow Leopard.

Categories: Apple
Tags: , , , ,

Leave a Reply