This is an archive of the discontinued LLVM Phabricator instance.

[Format] Work around current vim bugs in clang-format.py
ClosedPublic

Authored by sammccall on Apr 15 2020, 6:12 AM.

Details

Summary

Do line/col to byte conversions on the python side rather than relying on vim.
Its calculations are off when text annotations are present:

Diff Detail

Event Timeline

sammccall created this revision.Apr 15 2020, 6:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 6:12 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hokein accepted this revision.Apr 15 2020, 6:44 AM

thanks for tracing it down! looks good, I assume you have test it locally.

This revision is now accepted and ready to land.Apr 15 2020, 6:44 AM
This revision was automatically updated to reflect the committed changes.