[PATCH] D121069: [clang-format] Minimize the damage caused by AlignArrayOfStructures when working on non square arrays
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 6 15:12:43 PST 2022
owenpan added inline comments.
================
Comment at: clang/lib/Format/WhitespaceManager.h:321
+ }
auto Start = (CellStart + RowCount * CellCount);
auto End = Start + Offset;
----------------
MyDeveloperDay wrote:
> Ultimately these calculations are incorrect unless every CellCount for every row is the same, and for non-square they are not, this always had me confused as to why it starts at 1?
> Ultimately these calculations are incorrect unless every CellCount for every row is the same, and for non-square they are not, this always had me confused as to why it starts at 1?
Because the loop starts at `CellStop->NextColumnElement`, the 2nd row of the column?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121069/new/
https://reviews.llvm.org/D121069
More information about the cfe-commits
mailing list