/subscribe - I'm very interested in false positives in protocol buffer code :)<br><br><div class="gmail_quote">On Wed Nov 26 2014 at 8:08:51 AM Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi George,<br>
<br>
I think the mitigation strategy for reducing false positives right now from the analyzer are the two techniques you mention.<br>
<br>
You can use __clang_analyzer__ but it really is a heavy hammer, and essentially precludes the analyzer from doing anything useful with those files.  If you are using the analyzer from within Xcode, you also need to make sure that the source can still parse (during analysis) after you add the __clang_analyzer__ guards or Xcode will abort the analysis of your project because it encountered source files that can't parse.<br>
<br>
Specifically with respect to protocol buffer code, could you file one or more PRs about representative issues you are seeing?  There's a possibility they could be pruned using heuristics within the analyzer.  If protocol buffer code tends to be generated idiomatically with specific file extensions, e.g. .pb.cc, we could possibly use even that to tune some heuristics on the analyzer to avoid false positives.<br>
<br>
Cheers,<br>
Ted<br>
<br>
> On Nov 25, 2014, at 12:49 PM, George Kollias <<a href="mailto:georgioskollias@gmail.com" target="_blank">georgioskollias@gmail.com</a>> wrote:<br>
><br>
> Hello all,<br>
> Recently, we started using the clang static analyzer in our project<br>
> and it's already very helpful. One thing we'd like to improve though<br>
> is to reduce the number of the warnings/bugs we get about protobuf<br>
> generated files -*.pb.cc- (we're not really interested in them). What<br>
> would be the best way to avoid analysing them without affecting<br>
> heavily the rest of the code? E.g. would it be better to avoid<br>
> generating these files completely or it'd be better to wrap each of<br>
> these files in #ifndef __clang_analyzer__/#endif blocks?<br>
><br>
> Thank you,<br>
> George<br>
> ______________________________<u></u>_________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
<br>
<br>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote></div>