[PATCH] Implement correct indentation across preprocessor branches.

Daniel Jasper djasper at google.com
Fri Oct 11 13:10:38 PDT 2013



================
Comment at: lib/Format/UnwrappedLineParser.cpp:223
@@ +222,3 @@
+         I != E; ++I) {
+      Callback.consumeUnwrappedLine(*I);
+    }
----------------
Manuel Klimek wrote:
> Daniel Jasper wrote:
> > This seems like a really weird interface now (iterating over an array, adding each line and then calling finish). Would it make sense to change to a single method call where we can pass in an array? Then on the other side you could save the logic to add an empty array for the next set of lines in finishRun(), which is not really intuitive..
> I agree, but I'd like to change that in a follow-up patch. I think we might just want to return the unwrapped lines here, as they'll now get copied anyway.
Yeah. That's fine.


http://llvm-reviews.chandlerc.com/D1883

BRANCH
  ifdefs

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list