[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-13 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. >> In D104044#2812399 , @darwin wrote: >> >>> About the issue, let me explain it. It isn't bound to the google style or >>> LLVM style either, since both of them keep the first brace at the same line >>> of the namespa

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-13 Thread Darwin Xu via Phabricator via cfe-commits
darwin added a comment. In D104044#2814016 , @HazardyKnusperkeks wrote: > Going the full way, to fix the number of empty lines after/before/between > elements would be real nice. But even nicer would be if you can state a range. > > But I think all thos

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-13 Thread Darwin Xu via Phabricator via cfe-commits
darwin added a comment. In D104044#2813515 , @MyDeveloperDay wrote: > Do we need a set options for when we want to insert/retain/add a newline > after various constructs? frankly I've been mulling over the concept of > adding a > > NewLinesBetweenFun

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Going the full way, to fix the number of empty lines after/before/between elements would be real nice. But even nicer would be if you can state a range. But I think all those proposed options should not be added in one go. In D104044#2812399

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. My point being there is inconsistency between how different types of blocks of code are handled, and rather than trying to fix another corner case maybe we should take a more holistic approach, all these KeepEmptyLines and EmptyLineAfterXXX options and what you'l

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread Darwin Xu via Phabricator via cfe-commits
darwin added a comment. In D104044#2813491 , @MyDeveloperDay wrote: > Devils advocate how is this any different from > > class Foo { > > class Bar {} ; > } > > }; > > This would become > > class Foo { > class Bar {}; > }; > > i.e.

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. We should have perhaps though about this when we added ```EmptyLineAfterAccessModifier ``` and ```EmptyLineBeforeAccessModifier ``` Repository: rZORG LLVM Github Zorg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104044/new/ https://reviews.llvm.org/D

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Do we need a set options for when we want to insert/retain/add a newline after various constructs? frankly I've been mulling over the concept of adding a NewLinesBetweenFunctions: 1 I personally don't like code written like this as I find it hard to read, I'd

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Devils advocate how is this any different from class Foo { class Bar {} ; } }; This would become class Foo { class Bar {}; }; i.e. its going to remove the extra lines, just asking so we can understand if the removal of the line is the err

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread Darwin Xu via Phabricator via cfe-commits
darwin added a comment. In D104044#2812612 , @MyDeveloperDay wrote: > Just so I'm clear are you proposing that a newlines should always be added or > that single blank lines should be ignored? I can't tell if the bug is that > the line isn't being remo

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-11 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Just so I'm clear are you proposing that a newlines should always be added or that single blank lines should be ignored? I can't tell if the bug is that the line isn't being removed or sometimes not being added, either way there will be someone who wants it the o

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-10 Thread Darwin Xu via Phabricator via cfe-commits
darwin added a comment. In D104044#2811268 , @HazardyKnusperkeks wrote: > In D104044#2810909 , @darwin wrote: > >> Sorry, I may need some help here. It shows "Context not available.", how do >> I correct it? > >

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-10 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D104044#2810909 , @darwin wrote: > Sorry, I may need some help here. It shows "Context not available.", how do I > correct it? There are multiple ways: https://llvm.org/docs/Phabricator.html#requesting-a-review-vi

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-10 Thread Darwin Xu via Phabricator via cfe-commits
darwin added a comment. Sorry, I may need some help here. It shows "Context not available.", how do I correct it? Repository: rZORG LLVM Github Zorg CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104044/new/ https://reviews.llvm.org/D104044 __

[PATCH] D104044: [clang-format] Fix the issue of no empty line after namespace

2021-06-10 Thread Darwin Xu via Phabricator via cfe-commits
darwin created this revision. darwin added a project: clang-format. darwin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This a bug fix of https://bugs.llvm.org/show_bug.cgi?id=50116 First revision only contains the change of the test co