Makes sense to me, but I'll punt to daniel for the final lg.

================
Comment at: lib/Format/TokenAnnotator.cpp:532
@@ -529,3 +531,3 @@
       Contexts.back().IsExpression = true;
-      AnnotatedToken *Previous = Current.Parent;
-      while (Previous != NULL && Previous->isNot(tok::comma)) {
+      for (AnnotatedToken *Previous = Current.Parent;
+           Previous && Previous->isNot(tok::comma);
----------------
Just out of curiosity: why do you prefer a for loop here?

================
Comment at: lib/Format/TokenAnnotator.cpp:541
@@ -540,1 +540,3 @@
+    } else if (Current.is(tok::kw_return) || Current.is(tok::kw_throw) ||
         (Current.is(tok::l_paren) && !Line.MustBeDeclaration &&
+         (Current.Parent == NULL || Current.Parent->isNot(tok::kw_for)))) {
----------------
Indent.


http://llvm-reviews.chandlerc.com/D384
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to