Xcode 3.2 – Static Analysis
I have only heard rumblings on the net regarding the new static analyzer built into Xcode 3.2 that ships with Snow Leopard. However, Apple has updated their Dev Center to include documentation on several new developer tools and features with the release of Snow Leopard today.
The Xcode analyzer is simply put, a way for Xcode to inspect your code logically, in addition to syntactically as traditional compilers do. The analyzer can investigate each path your code can logically take, reporting errors on memory leaks, type mismatches, return values, and more.
From the Appe Mac Dev Center article:
New for Mac OS X v10.6, Xcode 3.2 introduces a revolutionary feature known as static analysis. You can think of static analysis as advanced warnings, identifying bugs in your code before it is run—hence the term “static.” Unlike traditional compiler warnings, the Xcode 3.2 static analyzer has a much deeper understanding of your code. The static analyzer travels down each possible code path, identifying logical errors such as unreleased memory—well beyond simple syntax errors normally found at compile time.
Essentially Xcode 3.2 can help you find errors in how you think. This is a very powerful feature, and should help you write much better code and understand your code better by helping you find logical errors that would normally creep up after your code has went to production (most of the time).
For more information the static analyzer used in Xcode 3.2, visit the clang website, a C frontend for the LLVM compiler.
Read more about Xcode 3.2 and the static analyzer at Apple’s Mac Dev Center

















Submitting Your Comment, give me a second...