This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix regression that breaks comments without a comment prefix
ClosedPublic

Authored by krasimir on Jan 30 2017, 12:35 PM.

Details

Summary

Consider formatting the following code fragment with column limit 20:

{
  // line 1
  // line 2\
  // long long long line
}

Before this fix the output is:

{
  // line 1
  // line 2\
  // long long
  long line
}

This patch fixes a regression that breaks the last comment line without
adding the '//' prefix.

Diff Detail

Repository
rL LLVM

Event Timeline

krasimir created this revision.Jan 30 2017, 12:35 PM
krasimir edited the summary of this revision. (Show Details)Jan 30 2017, 12:38 PM
krasimir added a reviewer: djasper.
krasimir added a subscriber: cfe-commits.
djasper accepted this revision.Jan 30 2017, 1:01 PM
This revision is now accepted and ready to land.Jan 30 2017, 1:01 PM
This revision was automatically updated to reflect the committed changes.