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

2022-03-06 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D121069#3362450 , @MyDeveloperDay wrote: > @feg208 I could do with some clarity on the algorithm, am I correct in > thinking it requires that the first row, to contain at least the maximum > number of columns for the rest of

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

2022-03-06 Thread Fred Grim via Phabricator via cfe-commits
feg208 accepted this revision. feg208 added a comment. I have been watching the issues pile up around this but work has prevented me from focusing on them. This seems like a reasonable compromise but the note of disabling this feature is also reasonable. Given where it had to be placed in the f

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-28 Thread Fred Grim via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa36227cb2b6a: fixes bug #51926 where dangling comma caused overrun (authored by feg208). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-28 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. Absolutely in agreement Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110481/new/ https://reviews.llvm.org/D110481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-28 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. By one other bug I mean an entirely separate bug that I will handle in a separate PR. Sorry if that was confusing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110481/new/ https://reviews.llvm.org/D110481

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-28 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. So I added in the second case but commented it out as it gets misformatted. However it doesn't assert which was the alarming outcome. I have one other bug to clean up here and I am going to open a bug to fix the line breaking after initial { in certain cases since the co

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-28 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 375544. feg208 added a comment. Gets rid of the crash for the second added case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110481/new/ https://reviews.llvm.org/D110481 Files: clang/lib/Format/WhitespaceMan

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-27 Thread Fred Grim via Phabricator via cfe-commits
feg208 added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17805 + "Section{\n" + "0, bar(),\n" + "}\n" HazardyKnusperkeks wrote: > feg208 wrote: > > HazardyKnusperkeks wro

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-26 Thread Fred Grim via Phabricator via cfe-commits
feg208 added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17805 + "Section{\n" + "0, bar(),\n" + "}\n" HazardyKnusperkeks wrote: > feg208 wrote: > > HazardyKnusperkeks wro

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-25 Thread Fred Grim via Phabricator via cfe-commits
feg208 added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:17805 + "Section{\n" + "0, bar(),\n" + "}\n" HazardyKnusperkeks wrote: > Here is no alignment, maybe add another

[PATCH] D110481: fixes bug #51926 where dangling comma caused overrun

2021-09-25 Thread Fred Grim via Phabricator via cfe-commits
feg208 created this revision. feg208 added reviewers: HazardyKnusperkeks, MyDeveloperDay, curdeius, klimek, djasper, tinloaf. feg208 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. bug 51926 identified an issue where a dangling comma cause

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

2021-09-24 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I am. I'll jump on this over the weekend. Sorry been a bit buried in my day job Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-

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

2021-06-15 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2820075 , @dyung wrote: > Another +1 for it failing intermittently on the bot I watch over, > llvm-clang-x86_64-sie-ubuntu-fast. Anything that can be done to stabilize the > test or to remove it would be appreciated!

[PATCH] D104295: removes redundant test

2021-06-15 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. If I could get someone to land this commit on my behalf I'd be obliged. I am working on the getting commit rights since that seems to be a pretty significant impediment to developing in llvm land but as of now I can't land this myself. name: Fred Grim email: fg...@apple

[PATCH] D104242: Alters a lit test to simplify and avoid a buildbot error

2021-06-15 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I put up a separate commit that just removes the test. I think this would resolve the builder issues but I don't think its worth even trying. We should abandon this (I think) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10

[PATCH] D104295: removes redundant test

2021-06-15 Thread Fred Grim via Phabricator via cfe-commits
feg208 created this revision. feg208 added reviewers: MyDeveloperDay, HazardyKnusperkeks, vitalybuka. feg208 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This lit test is causing intermittent failures on buildbots. It isn't testing anyt

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

2021-06-15 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I think, at this point, the sensible thing to do is to pull the test. As @MyDeveloperDay points out it isn't really adding any value above and beyond the unit tests. If it were non-determinism in the change itself the unit tests would catch it. They test the same formatt

[PATCH] D104242: Alters a lit test to simplify and avoid a buildbot error

2021-06-14 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I don’t have commit rights currently. Could I get someone to land this on my behalf? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104242/new/ https://reviews.llvm.org/D104242 __

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

2021-06-14 Thread Fred Grim via Phabricator via cfe-commits
feg208 added inline comments. Comment at: clang/test/Format/struct-array-initializer.cpp:5 +// RUN: grep -Ev "// *[A-Z-]+:" %s \ +// RUN: | clang-format -style="{BasedOnStyle: LLVM, AlignArrayOfStructures: Left}" %s \ +// RUN: | FileCheck -strict-whitespace -check-prefix=CHE

[PATCH] D104242: Removes an unused variable and alters a lit test to simplify and avoid a buildbot error

2021-06-14 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 351982. feg208 added a comment. Looks like the dead code is removed in main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104242/new/ https://reviews.llvm.org/D104242 Files: clang/test/Format/struct-array-ini

[PATCH] D104242: Removes an unused variable and alters a lit test to simplify and avoid a buildbot error

2021-06-14 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D104242#2817815 , @HazardyKnusperkeks wrote: > Could you split this into two diffs? Or are those two changes in any way > related? I can if you'd like. They are related in the sense that the dead code yielded warnings in the

[PATCH] D104242: Removes an unused variable and alters a lit test to simplify and avoid a buildbot error

2021-06-14 Thread Fred Grim via Phabricator via cfe-commits
feg208 created this revision. feg208 added reviewers: HazardyKnusperkeks, Bigcheese. feg208 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D104242 Files: clang/lib/Format/W

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

2021-06-10 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2811290 , @HazardyKnusperkeks wrote: > In D101868#2810452 , @feg208 wrote: > >> If I can get someone to submit this on my behalf I think we can call it a >> day. > > Please pos

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

2021-06-10 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. If I can get someone to submit this on my behalf I think we can call it a day. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-c

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked 3 inline comments as done. feg208 added a comment. All the review comments are addressed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-c

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350984. feg208 marked 11 inline comments as done. feg208 added a comment. Rolls up the remaining review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files:

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked an inline comment as done. feg208 added a comment. In D101868#2808826 , @curdeius wrote: > LGTM. That's a great piece work @feg208. Thank you! Awww thanks. I learned a lot from all the comments honestly. I appreciate the patience. > I've

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked an inline comment as done. feg208 added a comment. addressed the remaining review comment Comment at: clang/docs/ClangFormatStyleOptions.rst:216-221 +struct test demo[] = +{ +{56,23, "hello"}, +{-1, 93463, "world"}, +{ 7, 5,

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350974. feg208 added a comment. Regenerated the mangled ClangFormatStyle.rst file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleO

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350924. feg208 added a comment. Ick. Missed a semi colon in the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350920. feg208 added a comment. Fixes the busted test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/Rele

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. Got some changes. The failing test is an open issue Comment at: clang/docs/ClangFormatStyleOptions.rst:216-221 +struct test demo[] = +{ +{56,23, "hello"}, +{-1, 93463, "world"}, +{ 7, 5,"!!"} +}; --

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

2021-06-09 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350910. feg208 marked 4 inline comments as done. feg208 added a comment. Gets some of the formatting issues. Still chasing a test issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.

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

2021-06-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350774. feg208 added a comment. Fixes from clang-tidy checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst clang/do

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

2021-06-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 350746. feg208 added a comment. This alters the array alignment to allow for left alignment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFo

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

2021-06-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2805180 , @MyDeveloperDay wrote: > Better still how about having > > ArraryMemberAligmentEnum AlignArrayOfStructures > > of "None, Left and Right" > > I find boolean options don't stay boolean for long! Yeah once I s

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

2021-06-07 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. Ok. Given @HazardyKnusperkeks comment I'll make the default be left alignment and update the tests accordingly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868

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

2021-06-03 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349730. feg208 added a comment. Had some invalid code in the lit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst

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

2021-06-03 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349728. feg208 added a comment. Rebased against main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/Relea

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

2021-06-03 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. Got both of these Comment at: clang/lib/Format/TokenAnnotator.cpp:737-740 +const auto End = Contexts.rbegin() + 2; +auto Last = Contexts.rbegin(); +unsigned Depth = 0; +for (; Last != End; Last = std::next(Last)) { Hazard

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

2021-06-03 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349589. feg208 marked 2 inline comments as done. feg208 added a comment. Grabs up some review comments and adds lit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349434. feg208 added a comment. Adds a simple lit test for some sanity checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptio

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. one remaining Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349374. feg208 marked an inline comment as done. feg208 added a comment. Missed a request Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangForm

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349373. feg208 marked 2 inline comments as done. feg208 added a comment. Captured review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/C

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked 6 inline comments as done. feg208 added a comment. I rolled up the suggested changes. Comment at: clang/lib/Format/ContinuationIndenter.cpp:603 State.Column + Spaces + PPColumnCorrection); - // If "BreakBeforeInheritanceComma"

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349324. feg208 added a comment. oops left some debugging messages in Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst

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

2021-06-02 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 349299. feg208 added a comment. I am of the view that this is complete. Or at a minimum all the tests that have been requested pass and I would be surprised if there were gross errors or other major things I have missed Repository: rG LLVM Github Monorepo

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

2021-05-27 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 348346. feg208 marked an inline comment as done. feg208 added a comment. Rolls up review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/C

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

2021-05-27 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked 3 inline comments as done. feg208 added a comment. I picked up most of these. One of the tests is already covered (I think) maybe I am misunderstanding Comment at: clang/unittests/Format/FormatTest.cpp:16478 + "{56, /* a comment */ 23, \"hello\"

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

2021-05-26 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 348020. feg208 added a comment. Still need to fix and added the tests I said I would but the comment tests are added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 F

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

2021-05-25 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 347709. feg208 added a comment. Addresses review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/

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

2021-05-25 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked 2 inline comments as done. feg208 added a comment. The tests still need to be added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-commit

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

2021-05-24 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 347419. feg208 added a comment. clang-tidy and clang-format changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst c

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

2021-05-24 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2776633 , @HazardyKnusperkeks wrote: > In D101868#2775550 , @feg208 wrote: > >> This reworks substantially this commit. I recognize there are lacking/broken >> tests but I just

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

2021-05-23 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 347252. feg208 added a comment. Fixes/adds a test that yielded a seg fault and quiets some clang-tidy checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: c

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

2021-05-22 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 347211. feg208 added a comment. Adds some tests and fixes a broken test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOptions.rst

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

2021-05-22 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 347209. feg208 added a comment. Forgot to alter the documentation to reflect right justified column alignment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files:

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

2021-05-22 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 347208. feg208 added a comment. This reworks substantially this commit. I recognize there are lacking/broken tests but I just would like to ensure that the general direction doesn't seem likely to end in tears Repository: rG LLVM Github Monorepo CHANGES SI

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

2021-05-21 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2774152 , @MyDeveloperDay wrote: > This looks like a good start.. Thanks. I am reworking it so I handle line breaking in a sane fashion and dropping the LineFormatter override since that really can't handle reformatti

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

2021-05-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2745942 , @HazardyKnusperkeks wrote: > Something which just came to my mind. Since you wrote your own LineFormatter, > you have to add test cases for all kinds of indention and wrapping. It seems > that the string wra

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

2021-05-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I still need to handle the 20 character case appropriately Comment at: clang/unittests/Format/FormatTest.cpp:16465 + "test demo[] = {\n" + "{56, 23,\"hello world i am a very long line that really, in any " + "just world, ought to

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

2021-05-07 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. Missed a request in the release notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 ___ cfe-commits mailing list cfe-commits@lists.llv

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

2021-05-07 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 343748. feg208 marked an inline comment as done. feg208 added a comment. Oops missed a request Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/Clan

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

2021-05-07 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 343747. feg208 added a comment. Added more tests and addressed review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 Files: clang/docs/ClangFormatStyleOpti

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

2021-05-07 Thread Fred Grim via Phabricator via cfe-commits
feg208 marked 4 inline comments as done. feg208 added a comment. I think I have all the tests and requested review comments rolled up Comment at: clang/unittests/Format/FormatTest.cpp:16352 +template +auto createStylesImpl( curdeius wrote: > HazardyKnusperke

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

2021-05-06 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I have a few outstanding questions about additional testing Comment at: clang/unittests/Format/FormatTest.cpp:16371 + Style); +} + HazardyKnusperkeks wrote: > curdeius wrote: > > I think we need more tests: > > * with a com

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

2021-05-06 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. To answer the question of why I think this is different then other alignment optionsIt seems to me that each alignment option emphasizes a specific thing, be it macros, bitfields, or (maybe closer in spirit) more simple declarations and assignments. I think this case

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

2021-05-06 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 343534. feg208 marked 8 inline comments as done. feg208 added a comment. This addresses most of the review comments. There remain a few tests to add Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ http

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

2021-05-04 Thread Fred Grim via Phabricator via cfe-commits
feg208 created this revision. feg208 added reviewers: tinloaf, djasper, klimek, curdeius. feg208 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This adds a new formatter to arrange array of struct initializers into neat columns Reposito