<div dir="ltr">On Mon, Feb 11, 2013 at 6:11 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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>
<br>
================<br>
Comment at: lib/Format/TokenAnnotator.cpp:541<br>
@@ -540,1 +540,3 @@<br>
</div><div class="im">+    } else if (Current.is(tok::kw_return) || Current.is(tok::kw_throw) ||<br>
         (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&<br>
</div><div class="im">+         (Current.Parent == NULL || Current.Parent->isNot(tok::kw_for)))) {<br>
</div>----------------<br>
Manuel Klimek wrote:<br>
> Indent.<br>
Done.<br>
<div class="im"><br>
================<br>
Comment at: lib/Format/TokenAnnotator.cpp:532<br>
@@ -529,3 +531,3 @@<br>
</div><div class="im">       Contexts.back().IsExpression = true;<br>
-      AnnotatedToken *Previous = Current.Parent;<br>
-      while (Previous != NULL && Previous->isNot(tok::comma)) {<br>
+      for (AnnotatedToken *Previous = Current.Parent;<br>
+           Previous && Previous->isNot(tok::comma);<br>
</div>----------------<br>
<div class="im">Manuel Klimek wrote:<br>
> Just out of curiosity: why do you prefer a for loop here?<br>
</div>Loops of the form<br>
<br>
  init;<br>
  while(condition) {<br>
    // ...<br>
    update;<br>
  }<br>
  // no use of loop variable after loop<br>
<br>
read nicer as for loops for me, and Previous is slightly tighter scoped this way. But I can change it back if you like the old form better.<br></blockquote><div><br></div><div style>I don't care that much - I personally prefer while loops when it doesn't completely fit the "you have a fixed length list" idom, which in this case is arguable - but, as I said, no biggie - was mainly curious. </div>
</div></div></div>