Similar to D124868.
The ShouldShiftBeAdded lambda checks if extra space should be
added before the wrapped part of a braced list. If the first
element of the list is wrapped, no extra space should be added.
Differential D124956
[clang-format] Fix another bug in AlignConsecutiveAssignments owenpan on May 4 2022, 12:49 PM. Authored by
Details Similar to D124868. The ShouldShiftBeAdded lambda checks if extra space should be
Diff Detail Event TimelineComment Actions Just one last thought, shouldn't we have a test case close to what was reported in the issue? I.e. with PP directives. Comment Actions No, because the first part of that test case would cause non-consecutive assignments to be aligned. (See https://github.com/llvm/llvm-project/issues/55265.) Only then would the if block be treated as a braced list and get misindented. We should definitely use test cases with PP directives when fixing #55265 though. |