15
May
09

Tools: Clang

So we’ve mentioned the LLVM/Clang Static Analyzer already in passing, but there’s enough resources springing up all over to merit some more attention:

Bug Finding With Clang: 5 Resources To Get You Started has usefully descriptive links.

Automated Clang From Xcode has an AppleScript to enhance the convenience.

And for the ultimate in convenience, here is AnalysisTool: a GUI application which allows running both official and their custom analyses!

Well, we wouldn’t want to recommend anything without actual personal experience, so let’s run it over the project we submitted to Apple end of last week…

… OMFG!! 145 — ONE HUNDRED FORTY-FIVE — BUGS!! OK, deep breaths, deep breaths, let’s look at what they are. OK, those are in libvorbis, not actually a problem; and these are in libfaac, nothing immediately fatal there either; and libflac has some too, again no need to panic; and precisely one (a shadowed variable in framing.c, since you asked) in libogg.

And in my source … not a single one. No, not ‘just false positives’, actually no not a single quibble anywhere. We’re not completely certain if that makes us actually as clever as we’d like you to think we are, or just utterly OCD on our coding hygiene. Of course, there’s always the both option isn’t there?

In any case, we thoroughly recommend that no matter what you’re programming for, you familiarize yourself with Clang!


0 Responses to “Tools: Clang”


  1. No Comments

Leave a Reply