[PATCH] Change design for handling escaped newline and trailing comment layout.
Manuel Klimek
klimek at google.com
Wed May 22 05:53:35 PDT 2013
Submited as r182467
================
Comment at: lib/Format/WhitespaceManager.cpp:132-133
@@ +131,4 @@
+ }
+ Changes[Changes.size() - 1].IsTrailingComment =
+ Changes[Changes.size() - 1].Kind == tok::comment;
+}
----------------
Daniel Jasper wrote:
> Changes.back()?
Done.
================
Comment at: lib/Format/WhitespaceManager.cpp:138
@@ +137,3 @@
+ unsigned MinColumn = 0;
+ unsigned MaxColumn = UINT_MAX;
+ unsigned StartOfSequence = 0;
----------------
Daniel Jasper wrote:
> Why UINT_MAX and not Style.ColumnLimit as before?
Because I stole this code from the previous version :)
================
Comment at: lib/Format/WhitespaceManager.cpp:144
@@ +143,3 @@
+ unsigned ChangeMinColumn = Changes[i].StartOfTokenColumn;
+ // FIXME: Correctly handle in PP directives.
+ unsigned ChangeMaxColumn = Style.ColumnLimit - Changes[i].TokenLength;
----------------
Daniel Jasper wrote:
> Correctly handle what? (Doesn't parse ..)
Fixed.
================
Comment at: lib/Format/WhitespaceManager.cpp:150
@@ +149,3 @@
+ (ChangeMinColumn > MaxColumn || ChangeMaxColumn < MinColumn) ||
+ Newlines > 1 ||
+ // Break the comment sequence if the previous line did not end
----------------
Daniel Jasper wrote:
> Consider moving this to line 148.
Done.
http://llvm-reviews.chandlerc.com/D840
More information about the cfe-commits
mailing list