[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-05-23 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. In D98237#2775514 , @MyDeveloperDay wrote: > When you made this commit you didn't regenerate the > ClangFormatStyleOptions.rst from the Format.h using > clang/docs/tool/dump_format_style.py now anyone else using the tool hit > is

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-05-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. When you made this commit you didn't regenerate the ClangFormatStyleOptions.rst from the Format.h using clang/docs/tool/dump_format_style.py now anyone else using the tool hit issues with code which is incorrect, we need to update Format.h to match what you expec

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Marek Kurdej 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 rGdda978eef87c: [clang-format] Option for empty lines after an access modifier. (authored by Max_S, committed by curdeius). Repository: rG LLVM Gith

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. Thank you for landing it. The information should be ok. But anyway: Max Sagebaum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 ___ cfe-

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I'll land it for you. Could you please provide "Name Surname " for commit attribution unless the info associated with your phabricator user is okay? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://review

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. Thank you for the answer. It did not know that I have to land it myself. Now I read up on https://llvm.org/docs/Phabricator.html Tried to land via 'arc land' but I do not have the access rights. So: Can someone please land the change for me. :) Repository: rG LLVM Git

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I think you can land it. The issues seem indeed unrelated. You might want to rebase and retest before landing to be sure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 __

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. Just wanted to ask if there is something missing for the merge? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 ___ cfe-commits mailing lis

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-31 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 334523. Max_S marked 7 inline comments as done. Max_S added a comment. Addressed last minor remarks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 Files: clang/docs/C

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-31 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM, but please clean up the comments before landing. Comment at: clang/docs/ClangFormatStyleOptions.rst:2132 +**EmptyLineAfterAccessModifier** (``EmptyLineAfterAccessMo

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM thank you for trying where you could to use verifyFormat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 _

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-30 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S marked 9 inline comments as done. Max_S added a comment. In the last update I fixed now everything and changed the tests. The tests use now verify format when possible. A bug here, kept me from doing it in a few places. I submitted a bug report for this: https://bugs.llvm.org/show_bug.cgi

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-30 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 334186. Max_S added a comment. Cleanup of tests and additonal logic for modifiers at the end of a class. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 Files: clang/do

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-23 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. In D98237#2643815 , @MyDeveloperDay wrote: > If you follow people tweeting about clang-format (as I do) and you look > through the bug tracking system, one major criticism of clang-format is that > the second clang-format can be d

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'd be quite interested to understand what the impact (if any) would be on javascript and C# formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 _

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. If you follow people tweeting about clang-format (as I do) and you look through the bug tracking system, one major criticism of clang-format is that the second clang-format can be different from the first, sometimes an equilibrium can be found sometimes not. Whe

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-22 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S marked 4 inline comments as done. Max_S added a comment. > The tests in line 9462 and 9466 require some additional implementation. > EmptyLineAfterAccessModifier is adding the three lines since it is configured > to do so, but EmptyLineBeforeAccessModifier would remove these lines. Since

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-22 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 332236. Max_S added a comment. Fixed interaction between Before and After configurations options. Before handles the case of two access modifiers specification following each other. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2132 +**EmptyLineAfterAccessModifier** (``EmptyLineAfterAccessModifierStyle``) + Defines in which cases to put empty line after access modifiers. + Comme

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. could you please mark your comments done when they are done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98237/new/ https://reviews.llvm.org/D98237 ___ cfe-commits maili

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 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/unittests/Format/FormatTest.cpp:9392 + "};\n"; + EXPECT_EQ(NL_B_3_A_1_I_3, format(NL_B_3_

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:9212 + StyleWithLine.EmptyLinesAfterAccessModifier = 1u; + EXPECT_EQ(test2NL, format(test0NL, StyleWithLine)); + EXPECT_EQ(test2NL, format(test1NL, StyleWithLine)); Max_S w

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added inline comments. Comment at: clang/include/clang/Format/Format.h:1914 +ELAAMS_Leave, +/// Always add empty line after access modifiers. +/// \code HazardyKnusperkeks wrote: > It does not always add, it does enforces one empty line, or am I

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-19 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 331818. Max_S added a comment. I added more tests for the interaction between MaxEmptyLinesToKeep, EmptyLineBeforeAccessModifier and EmptyLineAfterAccessModifier. During these tests I recognized, that EmptyLineBeforeAccessModifier = Always,Leave will (should

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-16 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/include/clang/Format/Format.h:1914 +ELAAMS_Leave, +/// Always add empty line after access modifiers. +/// \code It does not always add, it does enforces one empty line, or am I mistaken? Re

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-16 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. That looks really good. Please add tests as indicated in the inline comments and fix the formatting (see clang-format warnings). Comment at: clang/include/clang/Format/Format.h:1912 +/// Keep existing empty lines after access modifiers. +/// M

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. As already described in the update I changed the option name and how it behaves. It is now more in line with EmptyLineBeforeAccessModifier. I hope this was the correct way to push the rewrite, since all line remarks are now off. Comment at: clang/inclu

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 330588. Max_S added a comment. Changed the option to EmptyLineAfterAccessModifier and allowed the options Never, Leave and Always. Updated the tests accordingly and also added an entry in the changelog. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I'm missing tests with both EmptyLineBeforeAccessModifier and EmptyLine(s)AfterAccessModifier options. And possibly other options that could interfere with them. Comment at: clang/include/clang/Format/Format.h:1957 + /// Defines how many lines are pu

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-10 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please also add an entry in the `clang/doc/ReleaseNotes.rst`. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1284 (!PreviousLine->InPPDirective || !RootToken.HasUnescapedNewline)) -Newlines = std::min(1u, Newlines); +N

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-10 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. In D98237#2616193 , @MyDeveloperDay wrote: > Just out of interest and we are supposed to ask for this but can you point to > public style guide that uses this style. (actually I don't mind if other > formatting tools have this c

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Just out of interest and we are supposed to ask for this but can you point to public style guide that uses this style. (actually I don't mind if other formatting tools have this capability and you highlight it, like astyle or editorConfig etc) From my perspect

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-10 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1284 (!PreviousLine->InPPDirective || !RootToken.HasUnescapedNewline)) -Newlines = std::min(1u, Newlines); +Newlines = Style.EmptyLinesAfterAccessModifier + 1u;

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-10 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. In D98237#2614844 , @HazardyKnusperkeks wrote: > I would like additional tests: > > - With at least 2 empty lines > - With 0-2 empty lines without `verifyFormat` to demonstrate what is kept, > added, and removed. Thank you for rev

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-10 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 329574. Max_S added a comment. Updating D98237 : [clang-format] Option for empty lines after an access modifier. - Added additional verification tests - Added expected formating tests - Changed comment to reflect the new logic

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-03-09 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. I would like additional tests: - With at least 2 empty lines - With 0-2 empty lines without `verifyFormat` to demonstrate what is kept, added, and removed. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:1284 (!PreviousLine->