Frage

Hi I have installed the command line utility scan-build from http://clang-analyzer.llvm.org/scan-build.html.

When I run this on my Xcode 4.2 project which uses ARC, I get loads of potential memory leak warnings as the analyser is mistakenly thinking I have forgotten to manually release memory.

Does the latest version (checker-258) support ARC properly? The release notes say it should (http://clang-analyzer.llvm.org/release_notes.html) but this isn't the evidence I am seeing.

Thanks for any help..

War es hilfreich?

Lösung

I raised a bug with Apple about this - http://llvm.org/bugs/show_bug.cgi?id=11845. It turns out this was a known issue - see http://llvm.org/bugs/show_bug.cgi?id=11348.

The fix is to install checker-260, see http://clang-analyzer.llvm.org/release_notes.html plus this modification to ccc-analyzer - http://llvm.org/viewvc/llvm-project?view=rev&revision=149094.

Hopefully the fix to ccc-analyzer will be incorporated into a future release of scan-build.

Andere Tipps

Is there any reason why you need to run the static analyser separately, from the command line?

If not, can do this as part of your build workflow in Xcode. Just change the setting as shown below:

enter image description here

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top