[llvm-bugs] [Bug 46381] New: Trailing comments break AlignConsecutive* instead of being reflowed
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 18 08:04:15 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46381
Bug ID: 46381
Summary: Trailing comments break AlignConsecutive* instead of
being reflowed
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: Jake.Merdich at amd.com
Reporter: Jake.Merdich at amd.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
AlignConsecutive* takes place after comment reflowing, but one of the
conditions of breaking consecutive alignment is a line being too long. If a
line has a trailing comment that can be reflowed (or has already been reflowed)
but is otherwise too long, it would make more sense to still do the alignment
but reflow the comment afterwards to honor the column limit.
This would still need some mechanism to bail during consecutive alignment if
the comments cannot be reflowed without breaking the column limit and maybe
also for ridiculous cases like trailing comments with one word per line (a
penalty for breaking alignment would make sense).
This is a non-trivial change, so I'm leaving it here for tracking and feedback
while I think of a good way to do this cleanly.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200618/54efa8a3/attachment.html>
More information about the llvm-bugs
mailing list