[PATCH] D121069: [clang-format] Minimize the damage caused by AlignArrayOfStructures when working on non square arrays

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 6 08:08:26 PST 2022


curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.

Nits only.
+1 for adding a note in the option documentation.



================
Comment at: clang/lib/Format/WhitespaceManager.h:203
+    // Determine if every row in the the array
+    // as the same number of Columns.
+    bool HasEqualRowLengths() const {
----------------



================
Comment at: clang/unittests/Format/FormatTest.cpp:25359
+
+  // TODO don't adjust this non square array
+  verifyFormat("struct test demo[] = {\n"
----------------
Nit: should be updated as above I guess.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121069/new/

https://reviews.llvm.org/D121069



More information about the cfe-commits mailing list