[compiler-rt] r253608 - Tell clang-format that (most) sanitizers are written using Google style guide.

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 16:22:55 PST 2015


> On 2015-Nov-20, at 13:01, Kostya Serebryany <kcc at google.com> wrote:
> 
> 
> 
> On Fri, Nov 20, 2015 at 11:43 AM, Duncan P. N. Exon Smith via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> > On 2015-Nov-19, at 14:11, Alexey Samsonov via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> >
> > Author: samsonov
> > Date: Thu Nov 19 16:11:10 2015
> > New Revision: 253608
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=253608&view=rev
> > Log:
> > Tell clang-format that (most) sanitizers are written using Google style guide.
> 
> I'm guessing this isn't a change of policy, but I didn't know about it.
> Why don't they use the LLVM style?
> 
> Because they were initially developed outside of the llvm tree, we were not even sure the code will be ever accepted. 
>  
>   Is that documented in the coding
> standards? 
> no 
> Should it be?
> 
> I don't think so. 
> I believe the coding style already tells to use whatever style is in use in a given file. 
>  

But it says that all new files should use LLVM style, and we
generally expect to migrate files over time to use LLVM style.

This change would make all new files use the Google style.

I guess I'm also wondering whether this is something we should
accept generally for big patches that are originally developed
out of tree.  Were the sanitizers a special exception, or is
this how we do things now?

I know LLDB and libc++ also have their own coding styles, so
this isn't exactly the first precedent, but this is still kind
of surprising to me (as I guess I mistakenly thought that
llvm.git, clang.git, clang-tools-extra.git, and compiler_rt.git
were in general agreement).

> 
> >
> > Added:
> >    compiler-rt/trunk/lib/asan/.clang-format
> >    compiler-rt/trunk/lib/dfsan/.clang-format
> >    compiler-rt/trunk/lib/interception/.clang-format
> >    compiler-rt/trunk/lib/lsan/.clang-format
> >    compiler-rt/trunk/lib/msan/.clang-format
> >    compiler-rt/trunk/lib/safestack/.clang-format
> >    compiler-rt/trunk/lib/sanitizer_common/.clang-format
> >    compiler-rt/trunk/lib/tsan/.clang-format
> >
> > Added: compiler-rt/trunk/lib/asan/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/asan/.clang-format (added)
> > +++ compiler-rt/trunk/lib/asan/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/dfsan/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/dfsan/.clang-format (added)
> > +++ compiler-rt/trunk/lib/dfsan/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/interception/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/interception/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/interception/.clang-format (added)
> > +++ compiler-rt/trunk/lib/interception/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/lsan/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/lsan/.clang-format (added)
> > +++ compiler-rt/trunk/lib/lsan/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/msan/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/msan/.clang-format (added)
> > +++ compiler-rt/trunk/lib/msan/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/safestack/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/safestack/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/safestack/.clang-format (added)
> > +++ compiler-rt/trunk/lib/safestack/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/sanitizer_common/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/sanitizer_common/.clang-format (added)
> > +++ compiler-rt/trunk/lib/sanitizer_common/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> > Added: compiler-rt/trunk/lib/tsan/.clang-format
> > URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/.clang-format?rev=253608&view=auto
> > ==============================================================================
> > --- compiler-rt/trunk/lib/tsan/.clang-format (added)
> > +++ compiler-rt/trunk/lib/tsan/.clang-format Thu Nov 19 16:11:10 2015
> > @@ -0,0 +1 @@
> > +BasedOnStyle: Google
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list