Clang Static Analyzer Works for iPhone

A few months ago I tried using Clang's excellent Static Analyzer for an iPhone project but it sadly didn't work for some reason. Recently, I tried again with the latest release (1.3.7) and it worked! Since I'm currently working on a large project and just know that I didn't remember to balance all those hundreds of retains with releases, I knew this would come in handy, and it did dig up 10 or 11 very good retain/release errors which were really easy to fix but really hard to find. On the iPhone, these bugs are even more numerous because one tries to avoid autorelease as much as possible, since it's more expensive. And having something like Clang finds bugs for you for free and within seconds is indispensable.



Posted on at