Fixes https://github.com/llvm/llvm-project/issues/52724.
This is rather a workaround than a correct fix. To properly fix it, we'd need to find a better way to tell when not to decrease the StartOfTokenColumn.
Differential D115803
[clang-format] Fix tabs when using BreakBeforeTernaryOperators=false. curdeius on Dec 15 2021, 7:45 AM. Authored by
Details Fixes https://github.com/llvm/llvm-project/issues/52724. This is rather a workaround than a correct fix. To properly fix it, we'd need to find a better way to tell when not to decrease the StartOfTokenColumn.
Diff Detail
Event TimelineComment Actions So am I right in thinking the <tab> got replaced out because C.Spaces was > C.StartOfTokenColumn? (i.e. appendIndentText was given a negative number as the 4th argument) Comment Actions Yes, that's it. It's not actually negative because that's an unsigned value, so it underflows and gets big. That's also a reason why we can't just check for a non-positive value instead of a zero i. appendIndentText (that would be a different workaround though). |