<div dir="ltr">I would argue that it is not fast enough when you have to run it on the entire sanitizer code base instead of just the files you touched.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 14, 2013 at 7:56 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div class="im">On Fri, Jun 14, 2013 at 7:47 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Fri, Jun 14, 2013 at 8:40 AM, Alexey Samsonov <<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>> wrote:<br>


> WDYT of replacing cpplint with ClangFormat? Or at least adding a command to<br>
> automatically reformat all the sanitizers code with ClangFormat?<br>
<br>
</div>Your project, not mine & I don't know the full power of the cpplint<br>
tool you're using - but I assume it does more than clang-format does<br>
(clang-format only makes whitespace changes - it can't tell you about<br>
suspicuous casts, missing (or unnecessary) braces, etc (to guess at<br>
things that cpplint might do)).<br>
<br>
If clang-format is sufficient for your needs, that might be nice, or<br>
even if it leaves only a tiny number of cpplint issues left to deal<br>
with I suppose. But mostly I just meant that the asynchronous nature<br>
("check in code, check in more code... clean up cpplint") seemed a bit<br>
strange & we should pull that forward if possible (if cpplint is fast<br>
enough to run interactively, that is - there seems no reason to have<br>
it done so asynchronously/delayed)<br></blockquote><div><br></div></div><div>I see. Yes, cpplint is more powerful/configurable than ClangFormat. It is also fast enough.</div><div>cpplint is in fact a huge and ugly python script. Do you think it's ok to check it in compiler-rt repo</div>

<div>and write a build system target that would (optionally) invoke it? If yes, I'll go that way.</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div><br>
><br>
><br>
> On Tue, Jun 11, 2013 at 12:37 PM, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:<br>
>><br>
>> That would be lovely indeed.<br>
>><br>
>><br>
>> On Tue, Jun 11, 2013 at 12:41 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Mon, Jun 10, 2013 at 3:00 AM, Dmitry Vyukov <<a href="mailto:dvyukov@google.com" target="_blank">dvyukov@google.com</a>><br>
>>> wrote:<br>
>>> > Author: dvyukov<br>
>>> > Date: Mon Jun 10 05:00:54 2013<br>
>>> > New Revision: 183642<br>
>>> ><br>
>>> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=183642&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=183642&view=rev</a><br>
>>> > Log:<br>
>>> > tsan: fix lint warnings<br>
>>><br>
>>> This seems to be a recurring cleanup task - is there a reason it's not<br>
>>> part of the default/commonly-used build targets for compiler-rt?<br>
>>><br>
>>> ><br>
>>> > Modified:<br>
>>> >     compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc<br>
>>> ><br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc<br>
>>> ><br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h<br>
>>> ><br>
>>> > Modified:<br>
>>> > compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc<br>
>>> > URL:<br>
>>> > <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc?rev=183642&r1=183641&r2=183642&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc?rev=183642&r1=183641&r2=183642&view=diff</a><br>


>>> ><br>
>>> > ==============================================================================<br>
>>> > --- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc<br>
>>> > (original)<br>
>>> > +++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc Mon<br>
>>> > Jun 10 05:00:54 2013<br>
>>> > @@ -26,5 +26,5 @@ int main() {<br>
>>> >    return 0;<br>
>>> >  }<br>
>>> >  // CHECK: Test alloc: [[ADDR:.*]].<br>
>>> > -// CHECK: ignoring heap object at [[ADDR]]<br>
>>> > +// CHECK: ignoring heap object at [[ADDR]]<br>
>>> >  // CHECK: SUMMARY: LeakSanitizer: 1337 byte(s) leaked in 1<br>
>>> > allocation(s)<br>
>>> ><br>
>>> > Modified:<br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc<br>
>>> > URL:<br>
>>> > <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=183642&r1=183641&r2=183642&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=183642&r1=183641&r2=183642&view=diff</a><br>


>>> ><br>
>>> > ==============================================================================<br>
>>> > ---<br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc<br>
>>> > (original)<br>
>>> > +++<br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc<br>
>>> > Mon Jun 10 05:00:54 2013<br>
>>> > @@ -207,14 +207,15 @@ namespace __sanitizer {<br>
>>> >    unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);<br>
>>> >    unsigned struct_scc_modem_sz = sizeof(struct scc_modem);<br>
>>> >    unsigned struct_scc_stat_sz = sizeof(struct scc_stat);<br>
>>> > -  unsigned struct_serial_multiport_struct_sz = sizeof(struct<br>
>>> > serial_multiport_struct);<br>
>>> > +  unsigned struct_serial_multiport_struct_sz<br>
>>> > +      = sizeof(struct serial_multiport_struct);<br>
>>> >    unsigned struct_serial_struct_sz = sizeof(struct serial_struct);<br>
>>> >    unsigned struct_sockaddr_ax25_sz = sizeof(struct sockaddr_ax25);<br>
>>> >    unsigned struct_unimapdesc_sz = sizeof(struct unimapdesc);<br>
>>> >    unsigned struct_unimapinit_sz = sizeof(struct unimapinit);<br>
>>> >  #endif<br>
>>> ><br>
>>> > -#if !SANITIZER_ANDROID<br>
>>> > +#if !SANITIZER_ANDROID<br>
>>> >    unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);<br>
>>> >    unsigned struct_sioc_vif_req_sz = sizeof(struct sioc_vif_req);<br>
>>> >  #endif<br>
>>> ><br>
>>> > Modified:<br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h<br>
>>> > URL:<br>
>>> > <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=183642&r1=183641&r2=183642&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=183642&r1=183641&r2=183642&view=diff</a><br>


>>> ><br>
>>> > ==============================================================================<br>
>>> > ---<br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h<br>
>>> > (original)<br>
>>> > +++<br>
>>> > compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Mon<br>
>>> > Jun 10 05:00:54 2013<br>
>>> > @@ -219,7 +219,7 @@ namespace __sanitizer {<br>
>>> >    extern unsigned struct_unimapdesc_sz;<br>
>>> >    extern unsigned struct_unimapinit_sz;<br>
>>> >  #endif<br>
>>> > -<br>
>>> > +<br>
>>> >  #if !SANITIZER_ANDROID<br>
>>> >    extern unsigned struct_sioc_sg_req_sz;<br>
>>> >    extern unsigned struct_sioc_vif_req_sz;<br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > llvm-commits mailing list<br>
>>> > <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
>>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>>> _______________________________________________<br>
>>> llvm-commits mailing list<br>
>>> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>><br>
>><br>
><br>
><br>
><br>
> --<br>
> Alexey Samsonov, MSK<br>
</div></div></blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div>
</font></span></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>