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

Zachary Turner zturner at google.com
Mon Feb 9 11:59:56 PST 2015


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)"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150209/0de48e4f/attachment.html>


More information about the lldb-dev mailing list