[PATCH] D40310: Restructure how we break tokens.
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 24 06:43:01 PST 2017
krasimir added a comment.
Started the review. It would take a few cycles 💃
================
Comment at: lib/Format/ContinuationIndenter.cpp:1518
+ unsigned RemainingTokenColumns = 0;
+ // The column number we're currently at.
+ unsigned ContentStartColumn = 0;
----------------
Could you please spell out the invariants that we maintain about `TailOffset`, `RemainingTokenColumns` and `ContentStartColumn` (at least) at the beginning of every main loop iteration below? That would surely make it easier to review.
================
Comment at: lib/Format/ContinuationIndenter.cpp:1533
+ // ContentStartColumn is either
+ // - at the start of the line, directly after a break
+ // - the end of the last line +1, when continuing a reflow over multiple
----------------
If the previous iteration requested that we try to reflow, how can `ContentStartColumn` be at the start of the (current) line?
https://reviews.llvm.org/D40310
More information about the cfe-commits
mailing list