[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 4 11:14:53 PDT 2021


HazardyKnusperkeks accepted this revision.
HazardyKnusperkeks added a comment.

Remains the issue with the alignment, I would like to know @MyDeveloperDay 's opinion on that. Should the values be right aligned, or left aligned? As far as I see all alignment in clang-format is left until now.



================
Comment at: clang/lib/Format/WhitespaceManager.cpp:982
+void WhitespaceManager::alignArrayInitializers(unsigned Start, unsigned End) {
+
+  auto CellDescs = getCells(Start, End);
----------------
This is unneccessary. (But doesn't need a new revision until approved.)


================
Comment at: clang/lib/Format/WhitespaceManager.cpp:1081
+                                                                unsigned End) {
+
+  unsigned Depth = 0;
----------------
Same


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101868



More information about the cfe-commits mailing list