Typz added a comment.
@krasimir, @alexfh : can I get some feedback?
This patch solves a practical problem, i.e. allowing the comment to overflow a
bit without triggering a reflow [according to the priorities which are in
config, obviously]. It may not always provide the "best" wrapping, but as you
pointed out comments are unstructured, so processing must indeed stay quite
conservative: which is how this patch tries to behave.
Is there a better way to do this? or do you see something missing?
> There are at least three separate parts in clang-format that make up the
> formatting of comments: the normal parsing and optimization pipeline, the
> BreakableLineCommentSection / BreakableBlockComment classes that are
> responsible for breaking and reflowing inside comment sections, and the
> consecutive trailing comment alignment in the WhitespaceManager. This patch
> takes into account the first aspect but not the consequences for the other
You suggested there is an issue, but I could not isolate it. Can you provide an
cfe-commits mailing list