HomePhabricator

[clang-format] Emit absolute splits before lines for comments

Description

[clang-format] Emit absolute splits before lines for comments

Summary:
This patch makes the splits emitted for the beginning of comment lines during
reformatting absolute. Previously, they were relative to the start of the
non-whitespace content of the line, which messes up further TailOffset
calculations in breakProtrudingToken. This fixes an assertion failure reported
in bug 34236: https://bugs.llvm.org/show_bug.cgi?id=34236.

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D36956

Details

Committed
krasimirAug 23 2017, 8:16 AM
Reviewer
djasper
Differential Revision
D36956: [clang-format] Emit absolute splits before lines for comments
Parents
rL311558: Make lit :: shtest-format.py supported on Windows again
Branches
Unknown
Tags
Unknown