[cfe-dev] RFC clang analyzer false positives (for loop)

Daniel Marjamäki via cfe-dev cfe-dev at lists.llvm.org
Fri Aug 26 07:36:31 PDT 2016


Hello!

As far as I know, having few false positives is a major goal for the Clang static analyzer.

Yes I understand that false positives are inevitable. So a few fixes in my code to hide them are expected.

However if most warnings for a particular use case are in practice false positives I say these should be dropped. So I think the question should be if most warnings are false positives? Do you think your true positive ratio in your own code is good? Is it higher than 50%?

> But the example you have given is *not* wrong. It is completely correct.

Imho it is a false positive if I can easily see with human intelligence that the warning is wrong.

Best regards,
Daniel Marjamäki

..................................................................................................................
Daniel Marjamäki Senior Engineer
Evidente ES East AB  Warfvinges väg 34  SE-112 51 Stockholm  Sweden

Mobile:                 +46 (0)709 12 42 62
E-mail:                 Daniel.Marjamaki at evidente.se

www.evidente.se



More information about the cfe-dev mailing list