This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] do not break before { in JS comments
ClosedPublic

Authored by krasimir on Nov 6 2020, 12:47 AM.

Details

Summary

In JavaScript some @tags can be followed by {, and machinery that parses
these comments will fail to understand the comment if followed by a line break.

clang-format already handles this case by not breaking before { in comments.
However this was not working in cases when the column limit falls within @tag
or between @tag and {. This adapts clang-format for this case.

Diff Detail

Event Timeline

krasimir created this revision.Nov 6 2020, 12:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2020, 12:47 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
krasimir requested review of this revision.Nov 6 2020, 12:47 AM
krasimir updated this revision to Diff 303354.Nov 6 2020, 12:50 AM

update test case range

krasimir updated this revision to Diff 303355.Nov 6 2020, 12:52 AM

collect commits

krasimir added a project: Restricted Project.
mprobst accepted this revision.Nov 6 2020, 1:00 AM
This revision is now accepted and ready to land.Nov 6 2020, 1:00 AM
This revision was landed with ongoing or failed builds.Nov 6 2020, 1:35 AM
This revision was automatically updated to reflect the committed changes.