[PATCH] Change design for handling escaped newline and trailing comment layout.
Daniel Jasper
djasper at google.com
Wed May 22 05:33:31 PDT 2013
A few nits, but otherwise looks good :-). Thanks for cleaning this up!!!!
================
Comment at: lib/Format/WhitespaceManager.cpp:132-133
@@ +131,4 @@
+ }
+ Changes[Changes.size() - 1].IsTrailingComment =
+ Changes[Changes.size() - 1].Kind == tok::comment;
+}
----------------
Changes.back()?
================
Comment at: lib/Format/WhitespaceManager.cpp:138
@@ +137,3 @@
+ unsigned MinColumn = 0;
+ unsigned MaxColumn = UINT_MAX;
+ unsigned StartOfSequence = 0;
----------------
Why UINT_MAX and not Style.ColumnLimit as before?
================
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;
----------------
Correctly handle what? (Doesn't parse ..)
================
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
----------------
Consider moving this to line 148.
http://llvm-reviews.chandlerc.com/D840
BRANCH
whitespace
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list