[cfe-dev] XCode 4.3 and Clang vs AppCode static analysis question.
Jordan Rose
jediknil at belkadan.com
Tue Apr 24 08:22:21 PDT 2012
Hello, Seamus. Clang does have support for this check, but it's disabled by default (possibly because of http://llvm.org/bugs/show_bug.cgi?id=8838 ).
To run the analyzer from the command line, see the instructions at http://clang-analyzer.llvm.org/scan-build.html . You can use "-enable-checker experimental.osx.cocoa.Dealloc" to see if it would have caught your problems.
I'm not sure if there are immediate plans to re-enable this check, but your e-mail demonstrates there is clearly interest in it. Ted or Anna might have something more definite to say on this.
Jordy
On Apr 24, 2012, at 10:31, Seamus McGowan wrote:
> Hello,
>
> Please bear with me, I'm new to iOS development and Objective-C.
>
> We have our XCode project setup to perform static analysis and have never seen the analyzer generate a message to date. I use AppCode to edit my code and I decided to evaluate its project level static analysis.
>
> AppCode picked up 54 ivars that were not properly de-allocated. At least 50 of these were legit, (we nailed a couple memory leaks in fact.)
>
> Should Clang have identified these?
>
> I have attempted to run Clang from the command line to see if its an issue with the XCode project but encounter this error:
> clang: error: unsupported option '--serialize-diagnostics'
>
> (I'm trying to find out what this option is and where its set in the project.)
>
> NB, This project was originally started in XCode 4 , pre-ARC, and I have no idea if the project required tweaks or fixes in order to build.
>
> Any pointers in understanding the capabilities of clang and how to work with it properly would be appreciated.
>
> TIA
> Seamus
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list