views:

134

answers:

1

I am aware of a related question where someone mentioned the clang static analyzer but gave no further comments. Most of answers pointed to the lint family which disappointed me from time to time due to the bulk of false positives.

I noticed the clang static analyzer when I read XCode release notes. I have tried it and it only produced one false positive out of ~20,000 lines from several projects. The logic behind that false positive is a bit complicated which fools the analyzer. But what about false negatives? Will clang static analyzer miss a lot of potential errors? Does anyone has more experience? More generally, does static analyzer really help to reduce bugs?

Thanks in advance.

+2  A: 

I actually just read about this on one of the blogs I follow a few months back. I've been reading this guys blog since about December of 2008. He had a really great review/tutorial on using the static analyzer. Check it out.

Lucas McCoy
Actually I more like to see an article comparing clang and lint. However, I guess few people are using static analyzers. Anyway, the link you provide is helpful when few articles are around. Thanks.