6

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

Norbert
  • 4,239
  • 7
  • 37
  • 59

1 Answers1

2

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?

cdespinosa
  • 20,661
  • 6
  • 33
  • 39
  • I'm not that perfect ;) But seriously: a new line [UIView alloc]; doesn't generate a warning. C++: Right, I checked out Clang's homepage. – Norbert Oct 11 '09 at 07:04
  • ..and what did you find? I'm having the same issue. A project with c++ files. But analyzer won't find deliberate memory leaks anywhere, even in the top level objective C app delegate file. – occulus Sep 12 '11 at 16:24