<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr">On Fri, Dec 7, 2012 at 8:32 PM, Sebastian Redl <span dir="ltr"><<a href="mailto:sebastian.redl@getdesigned.at" target="_blank">sebastian.redl@getdesigned.at</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 07.12.2012, at 20:11, Sean Silva wrote:<br>
<br>
>> Regarding this specific example: I think it could be "simple" to just treat<br>
>> the whole line as "unbreakable" whenever there are several "case" on it.<br>
>><br>
>> That is, if two 'case' are on the same physical line, just treat this whole<br>
>> line as a black box, and contend yourself with aligning it first non-blank<br>
>> character.<br>
><br>
> That seems like it would work well and be a good general policy. There<br>
> are harder examples though like<br>
> <<a href="http://clang.llvm.org/doxygen/Lexer_8cpp_source.html#l01013" target="_blank">http://clang.llvm.org/doxygen/Lexer_8cpp_source.html#l01013</a>> where<br>
> the source code is actually aligned with contents of nearby comments.<br>
<br>
</div>Recognizing and leaving alone "tabular" array initializers would generally be a good thing. These are very common.<br></blockquote><div><br></div><div style>I think it's interesting to look at the two different use cases for clang-format:</div>
<div style>1. while writing my code, I basically type one big line (or break lines arbitrarily) and then hit clang-format to fix it all up for me. In that case I don't want clang-format to exclude certain constructs by itself</div>
<div style>2. when running over a source file before checking it in</div><div style><br></div><div style>I think if we can have 1 and 2 lead to consistent layouts, that would be a plus.</div><div style><br></div><div style>
Cheers,</div><div style>/Manuel</div><div style><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"></div></blockquote></div></div></div></div>