[PATCH] D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst for EmptyLineAfterAccessModifier

2021-05-25 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. I added the setting in the title. Could you please land this for me. Thank. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102989/new/ https://reviews.llvm.org/D102989 ___ cfe-comm

[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] D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst.

2021-05-23 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S created this revision. Max_S 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/D102989 Files: clang/include/clang/Format/Format.h Index: clang/include/clang/Format/For

[PATCH] D99503: [clang-format] Inconsistent behavior regarding line break before access modifier

2021-04-16 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 338011. Max_S added a comment. Sorry for the inconvenience. These were the errors, that inspired this patch. In all cases the new version is now the correct one. The default setting of EmptyLineBeforeAccessModifier is to insert empty lines for logical blocks,

[PATCH] D99503: [clang-format] Inconsistent behavior regarding line break before access modifier

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. Sorry forgot about that: Max Sagebaum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99503/new/ https://reviews.llvm.org/D99503 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[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] D99503: [clang-format] Inconsistent behavior regarding line break before access modifier

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. I do not have the access rights to the llvm git repo. Can you please land it for me. Thanks and thank you for the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99503/new/ https://reviews.llvm.org/D99503 ___

[PATCH] D99503: [clang-format] Inconsistent behavior regarding line break before access modifier

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 337691. Max_S edited the summary of this revision. Max_S added a comment. Added changelog entry. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99503/new/ https://reviews.llvm.org/D99503 Files: clang/docs/Relea

[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 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] D99503: [clang-format] Inconsistent behavior regarding line break before access modifier

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S updated this revision to Diff 337665. Max_S added a comment. Moved the test to their own section and fixed the formatting issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99503/new/ https://reviews.llvm.org/D99503 Files: clang/lib/For

[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-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] D99503: Fixes for bug 41870.

2021-03-29 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. This is patch for a bug reported in 2019 https://bugs.llvm.org/show_bug.cgi?id=41870 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99503/new/ https://reviews.llvm.org/D99503 ___ c

[PATCH] D99503: Fixes for bug 41870.

2021-03-29 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S created this revision. Max_S requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Checks for newlines in option Style.EmptyLineBeforeAccessModifier are now based on the formatted new lines and not on the new lines in the file. Repository

[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-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 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-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-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 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: Option for empty lines after an access modifier.

2021-03-08 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S created this revision. Max_S requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The current logic for access modifiers in classes ignores the option 'MaxEmptyLinesToKeep=1'. It is therefore impossible to have a coding style that reques