XCode: Static Analyzer doesn't work if C/C++-Code used in project

analyzer, clang, iphone, xcode

Solution

Clang does not analyze C++ code. But it should work on C code compiled as C. How do you know it's not working? Or are you sure your C code has errors it should be catching?

Problem

with XCode 3.2.1 Apple delivered a built-in Clang static analyzer. I am working on an iPhone project which uses some C-Code (one .h and .c file). When running Build and Analyze, Clang refuses work. The build results window just says Build Succeeded. Any ideas how to get it running with C/C++-Code? Regards, Norbert

Original source