This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix a bug in removing braces for the LLVM style
ClosedPublic

Authored by owenpan on Aug 27 2022, 10:38 PM.

Details

Summary

When an l_brace is wrapped and the line above it ends with a comment, the annotator adds ColumnLimit to the TotalLength of the l_brace, so the actual column position of the l_brace must be adjusted accordingly.

Fixes https://github.com/llvm/llvm-project/issues/57376.

Diff Detail

Event Timeline

owenpan created this revision.Aug 27 2022, 10:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2022, 10:38 PM
owenpan requested review of this revision.Aug 27 2022, 10:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2022, 10:38 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Aug 27 2022, 10:56 PM
owenpan edited the summary of this revision. (Show Details)Aug 27 2022, 11:03 PM
This revision was landed with ongoing or failed builds.Aug 28 2022, 2:26 PM
This revision was automatically updated to reflect the committed changes.