[PATCH] D139029: [clang-format] Don't move comments if AlignTrailingComments: Kind: Leave

2022-12-01 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added a comment. @mairacanal Thank you for the catch! Comment at: clang/unittests/Format/FormatTestComments.cpp:3101 + // Allow to keep 2 empty lines + Style.MaxEmptyLinesToKeep = 2; + EXPECT_EQ("// do not touch\n" This should probably be re

[PATCH] D137075: [clang-format] Fix document of AlignTrailingComments

2022-11-01 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki added a comment. Thank you. Please land when you have time. name: Yusuke Kadowaki email: yusuke.kadowaki.1...@gmail.com Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137075/new/ https://reviews.llvm.org/D137075 ___

[PATCH] D137075: [clang-format] Fix document of AlignTrailingComments

2022-10-31 Thread Yusuke Kadowaki via Phabricator via cfe-commits
yusuke-kadowaki updated this revision to Diff 471977. yusuke-kadowaki added a comment. Add a blankline after the endcode to deal with the Buildbot error. https://lab.llvm.org/buildbot/#/builders/92/builds/34906 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D137075: [clang-format] Fix document of AlignTrailingComments

2022-10-31 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: MyDeveloperDay, HazardyKnusperkeks. yusuke-kadowaki published this revision for review. Herald added a project: clang. Herald added a subscriber:

[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 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-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-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 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-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-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-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-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 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 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 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-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-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 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 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-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 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-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