This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Re-align broken comment lines where appropriate.
ClosedPublic

Authored by krasimir on Feb 3 2017, 1:53 AM.

Details

Summary

The comment aligner was skipping over newly broken comment lines. This patch fixes that.

source:

int ab; // line
int a; // long long

format with column limit 15 before:

int ab; // line
int a;  // long
       // long

format with column limit 15 after:

int ab; // line
int a;  // long
        // long

Event Timeline

krasimir created this revision.Feb 3 2017, 1:53 AM
krasimir updated this revision to Diff 86942.Feb 3 2017, 2:01 AM
  • Add a few more tests.
krasimir added a subscriber: cfe-commits.
djasper accepted this revision.Feb 3 2017, 2:23 AM

Thanks and sorry if I caused this :(

This revision is now accepted and ready to land.Feb 3 2017, 2:23 AM

It's very unlikely that you caused this. After re-flowing lots of cases started going over alternative code paths, and this looks like an instance of that.

This revision was automatically updated to reflect the committed changes.