[lldb-dev] Style guide and clang-format.

Zachary Turner zturner at google.com
Mon Feb 9 12:45:50 PST 2015


I was trying to give you the benefit of the doubt :)  TBH I'd be even
happier if we just use the LLVM rule consistently.  But it's often easier
for people to do this slowly.  From your original response though it sounds
like you might be fine just removing this rule and going with the LLVM
style.  If so, I'm definitely all for that.

If it makes you feel any better, I'm not crazy about some of their rules
either.  And actually they aren't even crazy about some of their rules.
But it does help with consistency and readability for people who work
across all of the codebases, and I think that kind of cross-project
pollination is really helpful for the individual projects, as well as the
community as a whole.

On Mon Feb 09 2015 at 12:06:25 PM <jingham at apple.com> wrote:

>
> > On Feb 9, 2015, at 11:59 AM, Zachary Turner <zturner at google.com> wrote:
> >
> >
> >
> > On Mon Feb 09 2015 at 11:56:44 AM <jingham at apple.com> wrote:
> >
> > I actually do think that having the space between the complex visual
> noise of the argument list and the function name makes it easier to detect
> functions when scanning code, which was why we did it this way to start.
> That and from years of working on FSF code, Jason & I were used to it.  It
> was a hard-and-fast rule for FSF code, but then for C++ this sort of thing:
> >
> > target.GetProcess ().GetSelectedThread ().GetStackFrameAtIndex (0)
> >
> > just looks stupid.  So we don't use it there.  I have a Quixotic desire
> to have some not hard-and-fast rules in the coding conventions, and rather
> to decide based on what looks good, because "I'm a free man, dammit!".
> >
> > That's fine, and that's why I'm proposing just removing it from the
> style guide.  Because leaving it in, and saying "We do this, but
> actually... not everyone does, but you can do it if you want!" is kind of
> redundant and unnecessary.  Unfortunately clang-format, being a tool, does
> have hard and fast rules.  So it seems like we can just say "do it if you
> want, but clang-format will remove it for you, and hopefully you use
> clang-format (because it has many other benefits as well)"
>
> That's a little problematic, because it's easier if the lldb style guide
> falls back to the llvm style guide on all the issues it doesn't specify.
> So if we leave the line out, then that should mean use the llvm rule.
>
> Jim
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150209/ca2a4a5c/attachment.html>


More information about the lldb-dev mailing list