<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">One point about this discussion, by the way.<div class=""><br class=""></div><div class="">While I support adherence to a consistent style for new/changed code, this should in no way be taken as support for going through and fixing indentation/style on old code.</div><div class="">We have internal branches that become hell to merge when e.g. spacing has been altered subtly, or brace depth is changed…</div><div class="">If we all do our part to clean the parts we’re touching, then I think that will be enough to keep LLDB clean. </div><div class=""><br class=""></div><div class=""><div class="">
<div class="">Sean</div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Aug 19, 2014, at 10:16 AM, Zachary Turner <<a href="mailto:zturner@google.com" class="">zturner@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I brought this up in a thread on lldb-commits, but since it is of more general interest, I want to make a thread here as well.<div class=""><br class=""></div><div class="">Can we have clear direction on LLDB coding style? Ideally in the form of an update to <a href="http://lldb.llvm.org/" class="">lldb.llvm.org</a>, but as that might require a little more effort, even some details in a response to this thread would be a help. Some things I've deduced from looking at the code, and other things I'm not so sure about, because of inconsistencies in the code or just no clear rule.</div>
<div class=""><br class=""></div><div class="">Indentation width: 4</div><div class="">Column limit: 140 (does this apply to comments too? Most function-declaration comments seem to wrap at 80)</div><div class="">Brace style: Allman</div><div class=""> if (foo)</div><div class="">
{</div><div class=""> // code here</div><div class=""> }</div><div class=""><br class=""></div><div class="">Break after function return type: Always, only on declarations, only on definitions, only in headers, or never?</div><div class=""><br class=""></div><div class="">Space before function parentheses: When?</div>
<div class=""><br class=""></div><div class="">Indent case labels inside switch: A or B below?</div><div class=""> switch (foo)</div><div class=""> {</div><div class=""> case A:</div><div class=""> case B:</div><div class=""> }</div><div class=""><br class=""></div><div class="">Indent braces inside of a case: A or B below?</div>
<div class=""> switch (foo)</div><div class=""> {</div><div class=""> case A:</div><div class=""> {</div><div class=""> }</div><div class=""> case B:</div><div class=""> {</div><div class=""> }</div><div class=""> }</div><div class=""><br class=""></div><div class="">Any other rules I should be cognizant of?</div>
</div>
_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@cs.uiuc.edu" class="">lldb-dev@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br class=""></div></blockquote></div><br class=""></div></body></html>