[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-30 Thread MyDeveloperDay 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 rG3edc1210a49d: [clang-format] Adds a formatter for aligning trailing comments over empty lines (authored by yusuke-kadowaki, committed by MyDeveloper

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-29 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added a comment. @MyDeveloperDay @HazardyKnusperkeks Could you land this please if we are not waiting for anything? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D132131 ___

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-18 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added a comment. In D132131#3865004 , @rymiel wrote: > Please provide a name and an email so someone could commit it on your behalf name: Yusuke Kadowaki email: yusuke.kadowaki.1...@gmail.com Repository: rG LLVM Github Monorepo CHANG

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-18 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added a comment. Please provide a name and an email so someone could commit it on your behalf Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D132131 ___ cfe-com

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-18 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added a comment. Thank you for all the reviews. Appreciate it. So will some of you land this or am I supposed to do something else? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D132131 ___

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 468015. yusuke-kadowaki marked 2 inline comments as done. yusuke-kadowaki added a comment. - Rebased - Remove more braces - Update rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://r

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think you also need to rebase to get rid of the "ClangFormatStyleOptions.rst" (which means you need to rebase and rerun dump_format_style.py Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://review

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Can you mark your comments done, I think you missed removing some braces that @HazardyKnusperkeks asked you to remove Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D132131 _

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-14 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. For me this is good. But please wait for @MyDeveloperDay . Comment at: clang/lib/Format/WhitespaceManager.cpp:931-933 + if (Style.AlignTrailingComments.Kind == FormatStyle::TCAS_Always) { +NewLi

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-13 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 467458. yusuke-kadowaki marked 3 inline comments as done. yusuke-kadowaki added a comment. Added more tests Removed braces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/WhitespaceManager.cpp:950-952 + if (RestoredLineLength >= Style.ColumnLimit && Style.ColumnLimit != 0) { +break; + } Elide the braces. Comment at: clang/un

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-10 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked an inline comment as done. yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. HazardyKnusperkeks wrot

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-10-10 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 466504. yusuke-kadowaki added a comment. Implment trailing comments Leave option There is two options, I think, when leaving comments exceeds the column limit. 1. Just format the trailing comments 2. Ignore the column limit for that line. This imple

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. yusuke-kadowaki wrote: > HazardyKnusperkeks wrote: > > yusuke-kadowaki

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. HazardyKnusperkeks wrote: > yusuke-kadowaki wrote: > > HazardyKnusperkeks

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/include/clang/Format/Format.h:428 + +bool operator==(const TrailingCommentsAlignmentStyle &R) const { + return Kind == R.Kind && OverEmptyLines == R.OverEmptyLines; MyDeveloperDay wrote: > yusuke-k

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-15 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 460407. yusuke-kadowaki marked 3 inline comments as done. yusuke-kadowaki added a comment. Implementation done except for the `Leave` option. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ ht

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:428 + +bool operator==(const TrailingCommentsAlignmentStyle &R) const { + return Kind == R.Kind && OverEmptyLines == R.OverEmptyLines; yusuke-kadowaki wrote: > MyDevelo

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-12 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked 2 inline comments as done. yusuke-kadowaki added a comment. So other than the naming, does the struct look good? Comment at: clang/include/clang/Format/Format.h:406 +/// Specifies the way to align trailing comments +TrailingCommentsAlignmentKinds

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-12 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:406 +/// Specifies the way to align trailing comments +TrailingCommentsAlignmentKinds Kind; +/// How many empty lines to apply alignment Kind? doesn't feel like the

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-10 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked 2 inline comments as done. yusuke-kadowaki added a comment. Thank you for the detailed explanation. I understood the needs for `unsigned OverEmptyLines` field. Please review the struct definition first. Then I'll implement the rest of the code. Comment

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-10 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 459292. yusuke-kadowaki marked an inline comment as done. yusuke-kadowaki added a comment. Just updated the Style struct field definitions for review. Haven't implemented the logics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > But you could set MaxEmptyLinesToKeep to 3 and aligning comments to over 2 > empty lines. Correct! lets assume MaxEmptyLinesToKeep = 3 if this case is valid in that case int a;// Foo int longer foo; // Foo int verylong foo; // Foo then so

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. struct Style { enum E { Yes, No, }; unsigned OverEmptyLines; } I don't understand the need for `state` as a struct could have multiple options (as enums) each enum should have a state that means "Leave" Repository: rG LLVM Github Mo

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-08 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D132131#3776956 , @MyDeveloperDay wrote: > an example of the exact reason why we should not reuse the same struct... > https://github.com/llvm/llvm-project/issues/57464 Just a bit rephrasing. In D132131#3777004

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-08 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked 7 inline comments as done. yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. HazardyKnusperkeks wrot

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. another reason for using a struct, is that we might want to say something like "AlignNamespaceTrainingComments:false" https://github.com/llvm/llvm-project/issues/57504 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. an example of the exact reason why we should not reuse the same struct... https://github.com/llvm/llvm-project/issues/57464 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D13213

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-07 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. MyDeveloperDay wrote: > yusuke-kadowaki wrote: > > MyDeveloperDay wrot

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-07 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. yusuke-kadowaki wrote: > MyDeveloperDay wrote: > > Is Don'tAlign the same

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-07 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked 3 inline comments as done. yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. MyDeveloperDay wrote: >

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:865 + + * ``TCAS_DontAlign`` (in configuration: ``DontAlign``) +Don't align trailing comments. Is Don'tAlign the same as Leave that other options support (for options i

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-06 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTestComments.cpp:2930 + Style.ColumnLimit = 15; + EXPECT_EQ("int ab; // line\n" +"int a; // long\n" yusuke-kadowaki wrote: > MyDeveloperDay wrote: > > Why not verifyForm

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-06 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/unittests/Format/FormatTestComments.cpp:2930 + Style.ColumnLimit = 15; + EXPECT_EQ("int ab; // line\n" +"int a; // long\n" MyDeveloperDay wrote: > Why not verifyFormat here too and below? To

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-06 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 458176. yusuke-kadowaki marked 7 inline comments as done. yusuke-kadowaki added a comment. - Introduce new struct - Update document This change should be ok for everyone (I hope). BTW, please correct my English if any or create a whole new one for me

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D132131#3771005 , @HazardyKnusperkeks wrote: > In D132131#3770170 , > @MyDeveloperDay wrote: > >> My personal preference is a new struct without Enabled > > We go for a new str

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D132131#3770170 , @MyDeveloperDay wrote: > My personal preference is a new struct without Enabled We go for a new struct. But why without enabled? Currently we have a boolean on/off switch `AlignTrailingComments`.

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTestComments.cpp:2930 + Style.ColumnLimit = 15; + EXPECT_EQ("int ab; // line\n" +"int a; // long\n" Why not verifyFormat here too and below? Repository: rG LLVM Gith

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/lib/Format/Format.cpp:1196 LLVMStyle.AlignConsecutiveMacros = {}; + LLVMStyle.AlignConsecutiveTrailingComments = {}; + LLVMStyle.AlignConsecutiveTrailingComments.Enabled = true; MyDeveloperDay wrote: >

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 457987. yusuke-kadowaki marked 6 inline comments as done. yusuke-kadowaki added a comment. - Change to use verifyFormat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:298 + /// Style of aligning consecutive trailing comments. + /// This option existed as ``AlignTrailingComments`` since version 3.7. + /// yusuke-kadowaki wrote: > MyDevelope

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. My personal preference is a new struct without Enabled Comment at: clang/lib/Format/Format.cpp:1196 LLVMStyle.AlignConsecutiveMacros = {}; + LLVMStyle.AlignConsecutiveTrailingComments = {}; + LLVMStyle.AlignConsecutiveTrailingComments.Enable

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked an inline comment as done. yusuke-kadowaki added a comment. Can we all agree with the decision whether we use the `AlignConsecutiveStyle` or introduce a new struct before I start implementing or updating the document? IMO, both are reasonable in some respects so I'd like yo

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:794 + +AlignConsecutiveMacros: AcrossEmptyLines + HazardyKnusperkeks wrote: > yusuke-kadowaki wrote: > > MyDeveloperDay wrote: > > > Should this say `AlignedConsecutuveCo

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-05 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I feel this patch leave the documentation in a right state, I won’t be giving it an accept in this form. Please also mark the comments as done once addressed so we know you’ve read and fixed our requests Comment at: clang/docs/ClangFormatStyleO

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-04 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3698 - QualifierOrder: ['inline', 'static', 'type', 'const'] + QualifierOrder: ['inline', 'static' , 'type', 'const'] HazardyKnusperkeks wrote: > Anyone knows

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-04 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 457864. yusuke-kadowaki marked 8 inline comments as done. yusuke-kadowaki added a comment. - Revert doc - Revert rst as well - Apply format - Update implementation to deal with the setting of MaxEmptyLinesToKeep - Add test for the combination with MaxE

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D132131#3766590 , @MyDeveloperDay wrote: > Is there a technical reason for reusing the struct rather than introducing a > new one? I see, good point. Really only if one would port the implementation to `AlignToke

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-02 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Is there a technical reason for reusing the struct rather than introducing a new one? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D132131 _

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-01 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In my opinion we are nearly done. Comment at: clang/docs/ClangFormatStyleOptions.rst:3698 - QualifierOrder: ['inline', 'static', 'type', 'const'] + QualifierOrder: ['inline', 'static' , 'type', 'const'] Anyone k

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-01 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki marked an inline comment as done. yusuke-kadowaki added inline comments. Comment at: clang/include/clang/Format/Format.h:141 - /// Alignment options. - /// - /// They can also be read as a whole for compatibility. The choices are: + /// Alignment styles of `

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-09-01 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 457294. yusuke-kadowaki added a comment. - Update tests - Fix document Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://reviews.llvm.org/D132131 Files: clang/docs/ClangFormatStyleOpt

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-31 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:141 - /// Alignment options. - /// - /// They can also be read as a whole for compatibility. The choices are: + /// Alignment styles of ``AlignConsecutiveStyle`` are: /// - None ---

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-31 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments HazardyKnusperkeks wrote: > yusuke-kadowaki wrote: > > MyDeveloperDay wrote: > > > may be AcrossEmptyLines sho

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-31 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 456945. yusuke-kadowaki marked 4 inline comments as done. yusuke-kadowaki added a comment. - Remove trailing whitespace - Update document Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https:

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-30 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments yusuke-kadowaki wrote: > MyDeveloperDay wrote: > > may be AcrossEmptyLines should be a number (to mean the

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-30 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments MyDeveloperDay wrote: > may be AcrossEmptyLines should be a number (to mean the number of empty lines) We need

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-30 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 456662. yusuke-kadowaki marked 9 inline comments as done. yusuke-kadowaki added a comment. - Fix the newline condition - Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ https://re

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:785 + - Consecutive + - AcrossEmptyLines + - AcrossComments may be AcrossEmptyLines should be a number (to mean the number of empty lines) Comment at: c

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-29 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:797 +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: true MyDeveloperDay wrote: > why do we need Enabled? > > isn't it just > > ``` > false: >

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:797 +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: true why do we need Enabled? isn't it just ``` false: AcrossEmptyLines: false AcrossComments:

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Format/Format.cpp:649 IO.mapOptional("AlignOperands", Style.AlignOperands); -IO.mapOptional("AlignTrailingComments", Style.

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-25 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/Format.cpp:649 IO.mapOptional("AlignOperands", Style.AlignOperands); -IO.mapOptional("AlignTrailingComments", Style.AlignTrailingComments); IO.mapOptional("AllowAllArgumentsOnNextLine", -

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:20044 Style.Language = FormatStyle::LK_Cpp; - CHECK_PARSE_BOOL(AlignTrailingComments); CHECK_PARSE_BOOL(AllowAllArgumentsOnNextLine); don't remove Repository: rG LL

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/Format.cpp:649 IO.mapOptional("AlignOperands", Style.AlignOperands); -IO.mapOptional("AlignTrailingComment

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-25 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 455579. yusuke-kadowaki marked 9 inline comments as done. yusuke-kadowaki added a comment. - Remove my comments - Update documentation - Sort Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132131/new/ ht

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please mark things as done. Comment at: clang/include/clang/Format/Format.h:297 AlignConsecutiveStyle AlignConsecutiveDeclarations; + /// Style of aligning consecutive trailing comments. + /// Run clang/docs/tools/dump_f

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-23 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added inline comments. Comment at: clang/include/clang/Format/Format.h:379 /// \version 3.7 bool AlignTrailingComments; HazardyKnusperkeks wrote: > Maybe you can port this to `AlignConsecutiveStyle`? `AcrossComments` would > not affect an

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-23 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 454864. yusuke-kadowaki edited the summary of this revision. yusuke-kadowaki added a comment. - [clang-format] Adds a formatter for aligning trailing comments over empty lines - Remove unnecessary style specifications - Add more tests - Port AlignTrai

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:1602 Style.AlignTrailingComments = false; + Style.AlignTrailingCommentsIgnoreEmptyLine = false; Style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Empty; ditto remove =

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-19 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:379 /// \version 3.7 bool AlignTrailingComments; Maybe you can port this to `AlignConsecutiveStyle`? `AcrossComments` would not affect anything in this context. =

[PATCH] D132131: [clang-format] Adds a formatter for aligning trailing comments over empty lines

2022-08-18 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki created this revision. Herald added a project: All. yusuke-kadowaki edited the summary of this revision. yusuke-kadowaki added reviewers: curdeius, MyDeveloperDay, HazardyKnusperkeks. yusuke-kadowaki published this revision for review. Herald added a project: clang. Herald added a s