[compiler-rt] r183642 - tsan: fix lint warnings

Alexey Samsonov samsonov at google.com
Fri Jun 14 08:56:51 PDT 2013


On Fri, Jun 14, 2013 at 7:47 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Fri, Jun 14, 2013 at 8:40 AM, Alexey Samsonov <samsonov at google.com>
> wrote:
> > WDYT of replacing cpplint with ClangFormat? Or at least adding a command
> to
> > automatically reformat all the sanitizers code with ClangFormat?
>
> Your project, not mine & I don't know the full power of the cpplint
> tool you're using - but I assume it does more than clang-format does
> (clang-format only makes whitespace changes - it can't tell you about
> suspicuous casts, missing (or unnecessary) braces, etc (to guess at
> things that cpplint might do)).
>
> If clang-format is sufficient for your needs, that might be nice, or
> even if it leaves only a tiny number of cpplint issues left to deal
> with I suppose. But mostly I just meant that the asynchronous nature
> ("check in code, check in more code... clean up cpplint") seemed a bit
> strange & we should pull that forward if possible (if cpplint is fast
> enough to run interactively, that is - there seems no reason to have
> it done so asynchronously/delayed)
>

I see. Yes, cpplint is more powerful/configurable than ClangFormat. It is
also fast enough.
cpplint is in fact a huge and ugly python script. Do you think it's ok to
check it in compiler-rt repo
and write a build system target that would (optionally) invoke it? If yes,
I'll go that way.


>
> >
> >
> > On Tue, Jun 11, 2013 at 12:37 PM, Kostya Serebryany <kcc at google.com>
> wrote:
> >>
> >> That would be lovely indeed.
> >>
> >>
> >> On Tue, Jun 11, 2013 at 12:41 AM, David Blaikie <dblaikie at gmail.com>
> >> wrote:
> >>>
> >>> On Mon, Jun 10, 2013 at 3:00 AM, Dmitry Vyukov <dvyukov at google.com>
> >>> wrote:
> >>> > Author: dvyukov
> >>> > Date: Mon Jun 10 05:00:54 2013
> >>> > New Revision: 183642
> >>> >
> >>> > URL: http://llvm.org/viewvc/llvm-project?rev=183642&view=rev
> >>> > Log:
> >>> > tsan: fix lint warnings
> >>>
> >>> This seems to be a recurring cleanup task - is there a reason it's not
> >>> part of the default/commonly-used build targets for compiler-rt?
> >>>
> >>> >
> >>> > Modified:
> >>> >     compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc
> >>> >
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> >>> >
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
> >>> >
> >>> > Modified:
> >>> > compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc
> >>> > URL:
> >>> >
> 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
> >>> >
> >>> >
> ==============================================================================
> >>> > --- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc
> >>> > (original)
> >>> > +++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc
> Mon
> >>> > Jun 10 05:00:54 2013
> >>> > @@ -26,5 +26,5 @@ int main() {
> >>> >    return 0;
> >>> >  }
> >>> >  // CHECK: Test alloc: [[ADDR:.*]].
> >>> > -// CHECK: ignoring heap object at [[ADDR]]
> >>> > +// CHECK: ignoring heap object at [[ADDR]]
> >>> >  // CHECK: SUMMARY: LeakSanitizer: 1337 byte(s) leaked in 1
> >>> > allocation(s)
> >>> >
> >>> > Modified:
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> >>> > URL:
> >>> >
> 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
> >>> >
> >>> >
> ==============================================================================
> >>> > ---
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> >>> > (original)
> >>> > +++
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> >>> > Mon Jun 10 05:00:54 2013
> >>> > @@ -207,14 +207,15 @@ namespace __sanitizer {
> >>> >    unsigned struct_ppp_stats_sz = sizeof(struct ppp_stats);
> >>> >    unsigned struct_scc_modem_sz = sizeof(struct scc_modem);
> >>> >    unsigned struct_scc_stat_sz = sizeof(struct scc_stat);
> >>> > -  unsigned struct_serial_multiport_struct_sz = sizeof(struct
> >>> > serial_multiport_struct);
> >>> > +  unsigned struct_serial_multiport_struct_sz
> >>> > +      = sizeof(struct serial_multiport_struct);
> >>> >    unsigned struct_serial_struct_sz = sizeof(struct serial_struct);
> >>> >    unsigned struct_sockaddr_ax25_sz = sizeof(struct sockaddr_ax25);
> >>> >    unsigned struct_unimapdesc_sz = sizeof(struct unimapdesc);
> >>> >    unsigned struct_unimapinit_sz = sizeof(struct unimapinit);
> >>> >  #endif
> >>> >
> >>> > -#if !SANITIZER_ANDROID
> >>> > +#if !SANITIZER_ANDROID
> >>> >    unsigned struct_sioc_sg_req_sz = sizeof(struct sioc_sg_req);
> >>> >    unsigned struct_sioc_vif_req_sz = sizeof(struct sioc_vif_req);
> >>> >  #endif
> >>> >
> >>> > Modified:
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
> >>> > URL:
> >>> >
> 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
> >>> >
> >>> >
> ==============================================================================
> >>> > ---
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
> >>> > (original)
> >>> > +++
> >>> >
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Mon
> >>> > Jun 10 05:00:54 2013
> >>> > @@ -219,7 +219,7 @@ namespace __sanitizer {
> >>> >    extern unsigned struct_unimapdesc_sz;
> >>> >    extern unsigned struct_unimapinit_sz;
> >>> >  #endif
> >>> > -
> >>> > +
> >>> >  #if !SANITIZER_ANDROID
> >>> >    extern unsigned struct_sioc_sg_req_sz;
> >>> >    extern unsigned struct_sioc_vif_req_sz;
> >>> >
> >>> >
> >>> > _______________________________________________
> >>> > llvm-commits mailing list
> >>> > llvm-commits at cs.uiuc.edu
> >>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>> _______________________________________________
> >>> llvm-commits mailing list
> >>> llvm-commits at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>
> >>
> >
> >
> >
> > --
> > Alexey Samsonov, MSK
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130614/f44c488b/attachment.html>


More information about the llvm-commits mailing list