[cfe-commits] [PATCH] "<<" alignment for clang-format

Daniel Jasper djasper at google.com
Thu Dec 6 01:57:49 PST 2012


  Submitted as r169488.


================
Comment at: lib/Format/Format.cpp:145
@@ +144,3 @@
+    /// on a level.
+    std::vector<unsigned> LessLessPos;
+
----------------
Manuel Klimek wrote:
> Perhaps call that LastLessLess to be consistent with LastSpace?
Well, the first one has to be used. Renamed to FirstLessLess.

================
Comment at: lib/Format/Format.cpp:249
@@ -220,1 +248,3 @@
+    if (Current.Tok.is(tok::lessless) && State.LessLessPos[ParenLevel] == 0)
+      State.LessLessPos[ParenLevel] = State.Column - 2;
 
----------------
Manuel Klimek wrote:
> I assume the -2 magic number here is the sizeof lessless? In that case, why not add Current.Tok.Length() after this if?
Done.


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



More information about the cfe-commits mailing list