================
@@ -927,14 +927,12 @@ BreakableLineCommentSection::BreakableLineCommentSection(
}
if (Lines[i].size() != IndentPrefix.size()) {
- PrefixSpaceChange[i] = FirstLineSpaceChange;
+ assert(Lines[i].size() > IndentPrefix.size());
- if (SpacesInPrefix + PrefixSpaceChange[i] < Minimum) {
- PrefixSpaceChange[i] +=
- Minimum - (SpacesInPrefix + PrefixSpaceChange[i]);
- }
+ PrefixSpaceChange[i] = SpacesInPrefix + FirstLineSpaceChange < Minimum
----------------
HazardyKnusperkeks wrote:
I was thinking wrong here. But adding parentheses when using the ternary
operator helps reading it. I thought that `SpaceInPrefix` was always the base.
https://github.com/llvm/llvm-project/pull/148324
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits