[lldb-dev] Style guide and clang-format.
jingham at apple.com
jingham at apple.com
Mon Feb 9 12:06:24 PST 2015
> 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
More information about the lldb-dev
mailing list