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.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 9479 Build 9479: arc lint + arc unit
Event Timeline
lib/Format/BreakableToken.cpp | ||
---|---|---|
553 | I think a split cannot be "Trimmed". Maybe "Result" or "NewSplit"? | |
557 | Why do you create a new split instead of: TrimmedSplit += Content[LineIndex].size() - TrimmedContent.size(); ? | |
unittests/Format/FormatTestComments.cpp | ||
2785 | s/crusher/crasher/ :-D Also, I'd just remove " bug 34236", seems redundant. |
I think a split cannot be "Trimmed". Maybe "Result" or "NewSplit"?