[LLVMdev] style guidelines

Chandler Carruth chandlerc at google.com
Mon Jun 4 15:22:48 PDT 2012


On Mon, Jun 4, 2012 at 2:29 PM, reed kotler <rkotler at mips.com> wrote:

> Probably this has come up before... but have we considered just adopting
> the Google style guidlines and maybe modifying it in some places?
>

Despite working at Google, and having to cope with multiple different
styles in my day-to-day work as a consequence, I would not push for this.

I think that we should focus on building some consistency of style and
formatting within the LLVM/Clang/... codebases rather than picking one
style or another. Frankly, I just don't care *what* the style is nearly as
much as I care that it is consistently applied.

I'll add minor points:

- I suspect LLVM/Clang/... have plenty of good reasons to deviate from any
existing style. We shouldn't constrain ourselves to external guidelines at
this point; these are large healthy projects.

- We can fix any problems or inconsistencies with the style guidelines if
contributors can agree to what they are and what would be a superior
alternative.


Finally:

They have a nice script for c++ which will check for many things.
>

It is not a nice script. Trust me. I use it every day, and I hate it with a
burning, fiery passion. Read the python code. It is not nice, it is
terrible. It is an atrocity. It is everything that is bad about trying to
"parse" C++ with regular expressions and python hacks, built up w/o any
overarching design or cohesion over years.

I await the day we can kill it off and use a real Clang-based tool instead.


>
> http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
>
> http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120604/7cc2d53a/attachment.html>


More information about the llvm-dev mailing list