This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Align block comment decorations
ClosedPublic

Authored by krasimir on Feb 14 2017, 8:06 AM.

Details

Summary

This patch implements block comment decoration alignment.

source:

/* line 1
* line 2
*/

result before:

/* line 1
* line 2
*/

result after:

/* line 1
 * line 2
 */

Diff Detail

Repository
rL LLVM

Event Timeline

krasimir created this revision.Feb 14 2017, 8:06 AM
krasimir added a subscriber: cfe-commits.
klimek added inline comments.Feb 16 2017, 2:26 AM
lib/Format/BreakableToken.cpp
397 ↗(On Diff #88378)

fewer lines

402 ↗(On Diff #88378)

Why wouldn't we want to align those
/* line
*/
?

krasimir updated this revision to Diff 88713.Feb 16 2017, 4:42 AM
  • Align decorations of block comments spanning two lines
krasimir marked 2 inline comments as done.Feb 16 2017, 4:42 AM
krasimir edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 16 2017, 4:46 AM
This revision was automatically updated to reflect the committed changes.

Maybe this could be added to the release notes?

Maybe this could be added to the release notes?

Sounds good! Could you please point me to the release docs? I don't seem to find a clang-format--specific section online.

I did it for you
Added to the release notes in r297721