<p dir="ltr">It was about a hundred in a huge codebase. It's definitely manageable, but the experiment has shown that this kind of a mistake is not likely to happen.</p>
<div class="gmail_quote">On 16 Sep 2015 23:25, "Aaron Ballman" <<a href="mailto:aaron.ballman@gmail.com">aaron.ballman@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Sep 16, 2015 at 5:21 PM, Alexander Kornienko <<a href="mailto:alexfh@google.com">alexfh@google.com</a>> wrote:<br>
> All found results were intended usages of sizeof on containers. 100% false<br>
> positive rate that is.<br>
<br>
Yes, but is that 4 results in 10MM LoC, or 4000 results in 40k LoC?<br>
;-) I guess I just don't have a good feel for how large the codebase<br>
is, and how many times it resulted in matching sane code. If it's<br>
really low (like 4 out of 10MM LoC), I think the checker may possibly<br>
be useful (just not in that code base). If it's anything remotely<br>
high, then I would agree, let's ditch it and not look back.<br>
<br>
~Aaron<br>
<br>
><br>
> On 16 Sep 2015 21:23, "Aaron Ballman" <<a href="mailto:aaron.ballman@gmail.com">aaron.ballman@gmail.com</a>> wrote:<br>
>><br>
>> On Wed, Sep 16, 2015 at 2:21 PM, Alexander Kornienko <<a href="mailto:alexfh@google.com">alexfh@google.com</a>><br>
>> wrote:<br>
>> > An update: I didn't find a single bug with this check in a large<br>
>> > codebase.<br>
>> > Turns out that it's rather useless. I'm inclined to kill it.<br>
>><br>
>> How bad is the false positive rate?<br>
>><br>
>> ~Aaron<br>
>><br>
>> ><br>
>> ><br>
>> > On Sun, Sep 13, 2015 at 11:22 AM, Alexander Kornienko<br>
>> > <<a href="mailto:alexfh@google.com">alexfh@google.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> I've also found a bunch of similar cases in our codebase, and I'm<br>
>> >> trying<br>
>> >> to figure out whether the pattern can be narrowed down to just<br>
>> >> dangerous<br>
>> >> cases. If we don't find a way to do so, we'll probably have to resort<br>
>> >> to "//<br>
>> >> NOLINT" to shut clang-tidy up.<br>
>> >><br>
>> >> On 13 Sep 2015 10:52, "Kim Gräsman" <<a href="mailto:kim.grasman@gmail.com">kim.grasman@gmail.com</a>> wrote:<br>
>> >>><br>
>> >>> Late to the party, but I wanted to ask: is there a way to indicate to<br>
>> >>> the checker that we really *did* mean sizeof()?<br>
>> >>><br>
>> >>> I think I've stumbled over code in our code base that uses<br>
>> >>> sizeof(container) to report memory usage statistics and it seems<br>
>> >>> valid, so it'd be nice if this checker could be silenced on a<br>
>> >>> case-by-case basis.<br>
>> >>><br>
>> >>> Thanks,<br>
>> >>> - Kim<br>
>> >>><br>
>> >>> On Sat, Sep 12, 2015 at 12:09 AM, Alexander Kornienko via cfe-commits<br>
>> >>> <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>> >>> > Indeed. But this has been fixed before I could get to it.<br>
>> >>> ><br>
>> >>> ><br>
>> >>> > On Thu, Sep 10, 2015 at 10:47 PM, Aaron Ballman via cfe-commits<br>
>> >>> > <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>> >>> >><br>
>> >>> >> aaron.ballman added a comment.<br>
>> >>> >><br>
>> >>> >> This appears to have broken one of the bots:<br>
>> >>> >><br>
>> >>> >> <a href="http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/15065" rel="noreferrer" target="_blank">http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/15065</a><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> <a href="http://reviews.llvm.org/D12759" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12759</a><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >><br>
>> >>> >> _______________________________________________<br>
>> >>> >> cfe-commits mailing list<br>
>> >>> >> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> >>> >> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
>> >>> ><br>
>> >>> ><br>
>> >>> > _______________________________________________<br>
>> >>> > cfe-commits mailing list<br>
>> >>> > <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> >>> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
>> >>> ><br>
>> ><br>
>> ><br>
</blockquote></div>