- User Since
- Mar 8 2021, 4:27 AM (9 w, 6 d)
Apr 16 2021
Sorry for the inconvenience. These were the errors, that inspired this patch.
Apr 15 2021
Sorry forgot about that: Max Sagebaum <email@example.com>
Thank you for landing it. The information should be ok. But anyway: Max Sagebaum <firstname.lastname@example.org>
I do not have the access rights to the llvm git repo. Can you please land it for me.
Added changelog entry.
Thank you for the answer. It did not know that I have to land it myself.
Just wanted to ask if there is something missing for the merge?
Moved the test to their own section and fixed the formatting issues.
Mar 31 2021
Thank you for the reviews.
Mar 30 2021
In the last update I fixed now everything and changed the tests.
Cleanup of tests and additonal logic for modifiers at the end of a class.
Mar 29 2021
This is patch for a bug reported in 2019 https://bugs.llvm.org/show_bug.cgi?id=41870
Mar 23 2021
Mar 22 2021
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 EmptyLineBeforeAccessModifier can only access the old file and not the new one. It does not know that three lines have been written and probably could not remove them.
I would like to implement it in such a way, that EmptyLineAfterAccessModifier looks ahead and skips its logic if the next token is a also an access modifier such that the logic of EmptyLineBeforeAccessModifier takes precedence. I could not find a way to get the next line. Is this possible somehow? Does there exist some helper functionality?
Fixed interaction between Before and After configurations options. Before handles the case
of two access modifiers specification following each other.
Mar 19 2021
I added more tests for the interaction between MaxEmptyLinesToKeep, EmptyLineBeforeAccessModifier and EmptyLineAfterAccessModifier. During these tests I recognized, that EmptyLineBeforeAccessModifier = Always,Leave will (should adhere) to MaxEmptyLinesToKeep. So the option does not force the new line it only applies it if it is missing. I changed the logic for EmptyLineAfterAccessModifier accordingly.
Mar 15 2021
As already described in the update I changed the option name and how it behaves. It is now more in line with EmptyLineBeforeAccessModifier.
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.
Mar 10 2021
Updating D98237: [clang-format] Option for empty lines after an access modifier.