Page MenuHomePhabricator

HazardyKnusperkeks (Björn Schäpers)
User

Projects

User does not belong to any projects.

User Details

User Since
Nov 12 2020, 2:35 AM (31 w, 1 d)

Recent Activity

Yesterday

HazardyKnusperkeks accepted D93528: [clang-format] Add basic support for formatting JSON.

Nice trick! :)

Thu, Jun 17, 1:51 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

I don't think I have permissions. Happy to do it if I'm given permissions (I'm assuming the instructions are the general LLVM ones). Otherwise:

Name: Vitali Lovich
E-mail: vlovich@gmail.com

Thu, Jun 17, 3:29 AM · Restricted Project, Restricted Project

Wed, Jun 16

HazardyKnusperkeks added a comment to D104096: [Clang-Format] Add ReferenceAlignment directive.

Ping,

I do not have commit access, can someone submit this as time permits ?

Wed, Jun 16, 11:09 AM · Restricted Project

Tue, Jun 15

HazardyKnusperkeks added a comment to D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace.

Just asking: Would it be different if there is auto, decltype(auto), decltype(a+b), typename or template as trailing return type?

Tue, Jun 15, 12:03 PM · Restricted Project, Restricted Project

Mon, Jun 14

HazardyKnusperkeks added a comment to D104242: Alters a lit test to simplify and avoid a buildbot error.

Could you split this into two diffs? Or are those two changes in any way related?

Mon, Jun 14, 12:58 PM · Restricted Project
HazardyKnusperkeks accepted D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace.
Mon, Jun 14, 12:54 PM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D104209: [clang-format] distinguish function type casts after 21c18d5a04316891110cecc2bf37ce51533decba.
Mon, Jun 14, 12:45 PM · Restricted Project

Sun, Jun 13

HazardyKnusperkeks committed rG673c5ba58497: [clang-format] Adds a formatter for aligning arrays of structs (authored by feg208).
[clang-format] Adds a formatter for aligning arrays of structs
Sun, Jun 13, 12:15 PM
HazardyKnusperkeks closed D101868: [clang-format] Adds a formatter for aligning arrays of structs.
Sun, Jun 13, 12:14 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace.

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 namespace.

Then I would like to use the LLVM style in the tests, otherwise it suggests that the issue is a result of using google style.

Wouldn't this suggest that this issue is a result of using LLVM style?

Sun, Jun 13, 7:34 AM · Restricted Project, Restricted Project

Sat, Jun 12

HazardyKnusperkeks accepted D104096: [Clang-Format] Add ReferenceAlignment directive.

Thanks for the work!

Sat, Jun 12, 8:15 AM · Restricted Project

Fri, Jun 11

HazardyKnusperkeks added a comment to D104096: [Clang-Format] Add ReferenceAlignment directive.

Can you also add tests with the alignment of declarations? We already have such for pointers.

Fri, Jun 11, 12:04 PM · Restricted Project
HazardyKnusperkeks added a comment to D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace.

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.

Fri, Jun 11, 11:58 AM · Restricted Project, Restricted Project

Thu, Jun 10

HazardyKnusperkeks accepted D99840: [clang-format] Correctly attach enum braces with ShortEnums disabled.

LGTM. I also consider it a bug. LLVM should not be affected as it uses AllowShortEnumsOnASingleLine: true whereas this problem arises only with AllowShortEnumsOnASingleLine: false.
Anyway, those that find the new behaviour problematic, can always set BreakBeforeBraces: Custom and BraceWrapping.AfterEnum: true to get the old behaviour.
@lunasorcery, please update release notes before landing.
If you don't have commit rights, please provide "Your Name <email@address>" for commit attribution, otherwise we'll use the name/email associated with you Phabricator account.

Thu, Jun 10, 12:52 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D91950: [clang-format] Add BreakBeforeInlineASMColon configuration.

Then we can push it, do you need some one to do that? If yes please post name and email.

Thu, Jun 10, 12:51 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

LGTM, but please wait for more responses.

Thu, Jun 10, 12:49 PM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D103678: [Format] Fix incorrect pointer/reference detection.

Do you need some one to commit this? If yes please state name and email, some one will chime in to commit it.

Thu, Jun 10, 12:48 PM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D101868: [clang-format] Adds a formatter for aligning arrays of structs.

If I can get someone to submit this on my behalf I think we can call it a day.

Thu, Jun 10, 12:46 PM · Restricted Project, Restricted Project
HazardyKnusperkeks closed D100590: DeclContext: Fix iterator category.
Thu, Jun 10, 12:45 PM · Restricted Project, Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D90238: [clang-format] Added ReferenceAlignmentStyle option - (Update to D31635).

I think this would be a nice addition, and in the past I would have used it. I really like the option Pointer.

Thu, Jun 10, 12:43 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace.

Sorry, I may need some help here. It shows "Context not available.", how do I correct it?

Thu, Jun 10, 12:38 PM · Restricted Project, Restricted Project

Fri, Jun 4

HazardyKnusperkeks accepted D101868: [clang-format] Adds a formatter for aligning arrays of structs.

Remains the issue with the alignment, I would like to know @MyDeveloperDay 's opinion on that. Should the values be right aligned, or left aligned? As far as I see all alignment in clang-format is left until now.

Fri, Jun 4, 11:14 AM · Restricted Project, Restricted Project

Thu, Jun 3

HazardyKnusperkeks committed rG6f605b8d0bc1: [clang-format] Add PPIndentWidth option (authored by gergap).
[clang-format] Add PPIndentWidth option
Thu, Jun 3, 8:55 AM
HazardyKnusperkeks committed rG3e333cc82e42: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations (authored by gergap).
[clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations
Thu, Jun 3, 8:55 AM
HazardyKnusperkeks closed D103286: [clang-format] Add PPIndentWidth option.
Thu, Jun 3, 8:55 AM · Restricted Project, Restricted Project
HazardyKnusperkeks closed D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.
Thu, Jun 3, 8:55 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added inline comments to D103286: [clang-format] Add PPIndentWidth option.
Thu, Jun 3, 8:06 AM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D103589: [Format] Fix incorrect pointer detection.

Seems reasonable. :)

Thu, Jun 3, 1:16 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added inline comments to D101868: [clang-format] Adds a formatter for aligning arrays of structs.
Thu, Jun 3, 1:10 AM · Restricted Project, Restricted Project

Wed, Jun 2

HazardyKnusperkeks requested changes to D101868: [clang-format] Adds a formatter for aligning arrays of structs.

I've added a few comments, and I would like to hear the opinion of others regarding the left or right alignment of the elements.

Wed, Jun 2, 1:31 PM · Restricted Project, Restricted Project

Tue, Jun 1

HazardyKnusperkeks added inline comments to D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.
Tue, Jun 1, 2:49 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.

Will do on Thursday.

Tue, Jun 1, 12:34 PM · Restricted Project, Restricted Project

Mon, May 31

HazardyKnusperkeks added a comment to D88084: [clang-format] Changed default styles BraceWrappping bool table to directly use variables.

Under "Related Objects" you can add the commit, so that one can navigate to it.

Mon, May 31, 3:32 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.

Forgot about that: Please add an entry in the ReleaseNotes.rst, I can imagine there are some people out there waiting for this.

Mon, May 31, 5:49 AM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D103286: [clang-format] Add PPIndentWidth option.

Looks good to me, I would just change the wording a bit. Could you please also add a entry in the ReleaseNotes.rst?

Mon, May 31, 5:47 AM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.

Thank you very much. :)
Do you have commit access, or do you need someone to land it? If the latter please state name and email for the commit.

Mon, May 31, 5:44 AM · Restricted Project, Restricted Project

Sat, May 29

HazardyKnusperkeks added inline comments to D103286: [clang-format] Add PPIndentWidth option.
Sat, May 29, 9:01 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a reviewer for D103286: [clang-format] Add PPIndentWidth option: MyDeveloperDay.
Sat, May 29, 9:00 AM · Restricted Project, Restricted Project
HazardyKnusperkeks requested changes to D103286: [clang-format] Add PPIndentWidth option.

Love it!

Sat, May 29, 8:59 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.

Please just check continue, I would like to make it a separate commit, because it seems unrelated to me. Otherwise this is good.

Sat, May 29, 8:55 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added inline comments to D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.
Sat, May 29, 2:10 AM · Restricted Project, Restricted Project

Fri, May 28

HazardyKnusperkeks accepted D103307: [clang-format] successive C# attributes cause line breaking issues.
Fri, May 28, 12:39 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations.

Looks quite solid for me.

Fri, May 28, 12:35 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a reviewer for D103245: [clang-format] Fix PointerAlignmentRight with AlignConsecutiveDeclarations: MyDeveloperDay.
Fri, May 28, 12:27 PM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D103204: [clang-format] New BreakInheritanceList style AfterComma.
Fri, May 28, 12:25 PM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D102706: [clang-format] Add new LambdaBodyIndentation option.

LGTM, but please wait for more responses.

Fri, May 28, 12:25 PM · Restricted Project, Restricted Project

Thu, May 27

HazardyKnusperkeks added inline comments to D101868: [clang-format] Adds a formatter for aligning arrays of structs.
Thu, May 27, 12:52 PM · Restricted Project, Restricted Project
HazardyKnusperkeks closed D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst for EmptyLineAfterAccessModifier.
Thu, May 27, 4:15 AM · Restricted Project, Restricted Project
HazardyKnusperkeks committed rG7faffdeb48d3: [clang-format] [NFC] realign documentation in Format.h... (authored by Max_S).
[clang-format] [NFC] realign documentation in Format.h...
Thu, May 27, 4:13 AM
HazardyKnusperkeks added inline comments to D103204: [clang-format] New BreakInheritanceList style AfterComma.
Thu, May 27, 4:02 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added inline comments to D101868: [clang-format] Adds a formatter for aligning arrays of structs.
Thu, May 27, 4:00 AM · Restricted Project, Restricted Project

Wed, May 26

HazardyKnusperkeks added a comment to D95168: [clang-format] Add InsertBraces option.

Although verifyFormat is nice, I would add some EXPECT_EQ to show that the braces are really inserted.

Wed, May 26, 2:08 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a project to D95168: [clang-format] Add InsertBraces option: Restricted Project.
Wed, May 26, 2:07 AM · Restricted Project, Restricted Project

Tue, May 25

HazardyKnusperkeks committed rG9ef66ed43758: [clang-format][NFC] correctly sort StatementAttributeLike-macros' IO.map (authored by HazardyKnusperkeks).
[clang-format][NFC] correctly sort StatementAttributeLike-macros' IO.map
Tue, May 25, 10:59 PM
HazardyKnusperkeks requested changes to D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set.
Tue, May 25, 8:42 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D101868: [clang-format] Adds a formatter for aligning arrays of structs.

This reworks substantially this commit. I recognize there are lacking/broken
tests but I just would like to ensure that the general direction doesn't
seem likely to end in tears

I'm not deep enough in clang-format and currently have not enough time to check that in depth. But why are you right aligning?

So the basic approach here is to add the column aligning at the point that the lines are broken to make sure that we can align to the indented, now broken, columns. The right alignment was the easier path (at the moment) since the spaces attached to tokens in the change list proceeded the token and since I was calculating the column size with spaces based on a pointer attached to the token in the same column. To left align at each column I'd need to look at the adjacent column to determine the right number of spaces.

I would love to have a right aligning for numbers (or even better aligning around the decimal dot) in all my code, but strings I wouldn't want to right align.

I think we could certainly do that. I guess at this point (and this is somewhat motivated by the fact that I don't, and probably shouldn't, have commit rights the to llvm repo) I think if we want to move this commit forward we ought to agree on a set of changes and subsequent tests that we can all be comfortable with that would make this a viable bit of code. I don't think it has deep problems in the sense the prior one did and so should be amenable to laundry listing what we need and I'll move it forward. I think this set of tests should be added/fixed:

A test where the line is broken in the middle and/or first column (line breaking is really the sticky bit)
Fixing the test where the 100 column limit doesn't format correctly
Adding a test with several arrays to format and varying the other alignment options to make sure that doesn't confuse anything

I guess a final question I have would be, if we get this list sorted who can/would be capable of committing this change to the repo?

Tue, May 25, 8:36 AM · Restricted Project, Restricted Project

Mon, May 24

HazardyKnusperkeks added a reviewer for D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst for EmptyLineAfterAccessModifier: MyDeveloperDay.
Mon, May 24, 2:08 AM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst for EmptyLineAfterAccessModifier.
Mon, May 24, 2:08 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a reviewer for D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst for EmptyLineAfterAccessModifier: MyDeveloperDay.
Mon, May 24, 2:07 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D101868: [clang-format] Adds a formatter for aligning arrays of structs.

This reworks substantially this commit. I recognize there are lacking/broken
tests but I just would like to ensure that the general direction doesn't
seem likely to end in tears

Mon, May 24, 2:06 AM · Restricted Project, Restricted Project

Sat, May 22

HazardyKnusperkeks added inline comments to D102730: [clang-format] Support custom If macros.
Sat, May 22, 8:01 AM · Restricted Project, Restricted Project

Thu, May 20

HazardyKnusperkeks accepted D92168: [clang-format] Handle statement macro expressions in switch block.

For me it's good, but please wait for @MyDeveloperDay .

Thu, May 20, 2:33 AM · Restricted Project
HazardyKnusperkeks added a comment to D102730: [clang-format] Support custom If macros.

Looks good, but please add a test with the else IF and just else case.

Thu, May 20, 2:31 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

Maybe a bit more test cases with smaller lambdas? Or without the outer parenthesis?

I'm not sure I understand this comment. Which test case are you referring to by "or without the outer parenthesis"?

Thu, May 20, 2:23 AM · Restricted Project, Restricted Project

May 18 2021

HazardyKnusperkeks added a comment to D102706: [clang-format] Add new LambdaBodyIndentation option.

Maybe a bit more test cases with smaller lambdas? Or without the outer parenthesis?

May 18 2021, 11:52 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D92168: [clang-format] Handle statement macro expressions in switch block.

Apart from that comment I don't have any objections. :)

May 18 2021, 11:46 AM · Restricted Project

May 13 2021

HazardyKnusperkeks accepted D102392: [clang-format] PR50326 AlignAfterOpenBracket AlwaysBreak does not keep to the ColumnLimit.

I second that ColumnLimit breaking test case. :)

May 13 2021, 7:27 AM · Restricted Project, Restricted Project

May 8 2021

HazardyKnusperkeks added a comment to D101868: [clang-format] Adds a formatter for aligning arrays of structs.

Something which just came to my mind. Since you wrote your own LineFormatter, you have to add test cases for all kinds of indention and wrapping. It seems that the string wrapping does not happen, how about comments? Are classes, namespaces, functions, etc. correctly indented with various configurations?

May 8 2021, 3:31 AM · Restricted Project, Restricted Project
HazardyKnusperkeks requested changes to D101868: [clang-format] Adds a formatter for aligning arrays of structs.
May 8 2021, 1:23 AM · Restricted Project, Restricted Project

May 6 2021

HazardyKnusperkeks added inline comments to D101868: [clang-format] Adds a formatter for aligning arrays of structs.
May 6 2021, 9:12 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added inline comments to D92168: [clang-format] Handle statement macro expressions in switch block.
May 6 2021, 11:33 AM · Restricted Project
HazardyKnusperkeks accepted D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration.

Looks good, but please wait for others to state their opinion.

May 6 2021, 6:51 AM · Restricted Project, Restricted Project

May 5 2021

HazardyKnusperkeks added a comment to D101878: [git-clang-format] Do not apply clang-format to symlinks.

I have not a great knowledge about python, but it looks okay.

May 5 2021, 12:54 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a project to D101878: [git-clang-format] Do not apply clang-format to symlinks: Restricted Project.
May 5 2021, 12:51 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D101868: [clang-format] Adds a formatter for aligning arrays of structs.

I really like alignment! :)

May 5 2021, 12:09 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added inline comments to D101702: [clang-format] Add more support for C# 8 nullables.
May 5 2021, 11:38 AM · Restricted Project, Restricted Project

May 3 2021

HazardyKnusperkeks added inline comments to D101702: [clang-format] Add more support for C# 8 nullables.
May 3 2021, 1:27 PM · Restricted Project, Restricted Project
HazardyKnusperkeks accepted D101628: [Format] Don't sort includes if DisableFormat is true.

Jep, that would also confuse myself.

May 3 2021, 1:22 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a project to D101628: [Format] Don't sort includes if DisableFormat is true: Restricted Project.
May 3 2021, 1:20 PM · Restricted Project, Restricted Project

Apr 29 2021

HazardyKnusperkeks added inline comments to D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration.
Apr 29 2021, 12:12 PM · Restricted Project, Restricted Project

Apr 28 2021

HazardyKnusperkeks accepted D101344: [clang-format] Add `SpacesInAngles: Leave` option to keep spacing inside angle brackets as is..

Looks good, and I'm always in favor of having a Leave Option. :)

Apr 28 2021, 11:20 AM · Restricted Project

Apr 26 2021

HazardyKnusperkeks accepted D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration.
Apr 26 2021, 6:10 AM · Restricted Project, Restricted Project

Apr 23 2021

HazardyKnusperkeks added inline comments to D92168: [clang-format] Handle statement macro expressions in switch block.
Apr 23 2021, 8:38 AM · Restricted Project
HazardyKnusperkeks accepted D91950: [clang-format] Add BreakBeforeInlineASMColon configuration.

LGTM but please wait for @MyDeveloperDay opinion.

Apr 23 2021, 8:36 AM · Restricted Project, Restricted Project
HazardyKnusperkeks requested changes to D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration.

Looks okay for me, but please fix the formatting notes.

Apr 23 2021, 8:35 AM · Restricted Project, Restricted Project

Apr 21 2021

HazardyKnusperkeks requested changes to D91950: [clang-format] Add BreakBeforeInlineASMColon configuration.

Looks good, but please fix the clang-format notes.

Apr 21 2021, 11:30 AM · Restricted Project, Restricted Project
HazardyKnusperkeks requested changes to D92168: [clang-format] Handle statement macro expressions in switch block.
Apr 21 2021, 11:27 AM · Restricted Project

Apr 19 2021

HazardyKnusperkeks added a comment to D100727: [clang-format] Add options to AllowShortIfStatementsOnASingleLine to apply to "else if" and "else"..

More I look at the current state of this option, more I think it's misleading.
I would expect that the if after else is also controlled by this option. And, the last else as well (adding yet another option for that seems to be a bit an overkill)

@klimek, @MyDeveloperDay, I'd love to hear your input as well on the best course of action, as I've seen that you've discussed this topic a bit in https://reviews.llvm.org/D59087.

The current status quo looks like:

/// Different styles for handling short if statements.
enum ShortIfStyle : unsigned char {
  /// Never put short ifs on the same line.
  /// \code
  ///   if (a)
  ///     return;
  ///
  ///   if (b)
  ///     return;
  ///   else
  ///     return;
  ///
  ///   if (c)
  ///     return;
  ///   else {
  ///     return;
  ///   }
  /// \endcode
  SIS_Never,
  /// Put short ifs on the same line only if there is no else statement.
  /// \code
  ///   if (a) return;
  ///
  ///   if (b)
  ///     return;
  ///   else
  ///     return;
  ///
  ///   if (c)
  ///     return;
  ///   else {
  ///     return;
  ///   }
  /// \endcode
  SIS_WithoutElse,
  /// Always put short ifs on the same line.
  /// \code
  ///   if (a) return;
  ///
  ///   if (b) return;
  ///   else
  ///     return;
  ///
  ///   if (c) return;
  ///   else {
  ///     return;
  ///   }
  /// \endcode
  SIS_Always,
};

I.e. WithoutElse does not depend on the else statement being compound or not. I think I'll push a NFC commit to fix documentation and add tests for this.

Anyway, what I'm inclined to do is to have these options:

  • Never (same as now)
  • WithoutElse (same as now, concerns only a simple if (c) f();)
  • OnlyFirstIf (renamed from Always, and Always kept for backward compatibility, it would behave as currently, so only the first if in the sequence of if else if else if else is concerned)
  • AllIfsAndElse (would do what I want to achieve in this patch, so format like this:
if (c) f();
else if (c) f();
else if (c) f();
else if();

Naming is hard. All suggestions are welcome :).

Apr 19 2021, 1:00 PM · Restricted Project
HazardyKnusperkeks added a comment to D100727: [clang-format] Add options to AllowShortIfStatementsOnASingleLine to apply to "else if" and "else"..

Oh, you're right. Should we go for a separate option then? AllowShortElseStatementsOnASingleLine? What would control else if statements then?

Apr 19 2021, 1:18 AM · Restricted Project
HazardyKnusperkeks accepted D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set.

LGTM

Apr 19 2021, 12:27 AM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D100727: [clang-format] Add options to AllowShortIfStatementsOnASingleLine to apply to "else if" and "else"..

How is

if (a) return;
else
  return;

formatted with the different options?

Do you have something specific in mind?

Apr 19 2021, 12:24 AM · Restricted Project

Apr 18 2021

HazardyKnusperkeks added a comment to D100727: [clang-format] Add options to AllowShortIfStatementsOnASingleLine to apply to "else if" and "else"..

How is

if (a) return;
else
  return;

formatted with the different options?

Apr 18 2021, 12:10 PM · Restricted Project

Apr 16 2021

HazardyKnusperkeks committed rG46968577336f: DeclContext: Fix iterator category (authored by HazardyKnusperkeks).
DeclContext: Fix iterator category
Apr 16 2021, 12:00 PM
HazardyKnusperkeks requested changes to D92168: [clang-format] Handle statement macro expressions in switch block.

This looks okay, I think. But it should definitely add a release note and extend the documentation on statement macros.
Now I'm thinking maybe it should add a new flag to activate that behavior?

The patch was originally made as a fix for unexpected behavior. I'm not sure that someone would use a variant where the macro is not recognized as a case block... That's why I don't think the new flag is really needed.

Apr 16 2021, 11:45 AM · Restricted Project

Apr 15 2021

HazardyKnusperkeks updated the diff for D100590: DeclContext: Fix iterator category.

Trigger build.

Apr 15 2021, 10:22 PM · Restricted Project, Restricted Project, Restricted Project
HazardyKnusperkeks accepted D99503: [clang-format] Inconsistent behavior regarding line break before access modifier.

I don't know if you did elsewhere, but you have to give a name and email for the commit, so that someone can push it for you.

Apr 15 2021, 1:38 PM · Restricted Project, Restricted Project
HazardyKnusperkeks requested review of D100590: DeclContext: Fix iterator category.
Apr 15 2021, 11:54 AM · Restricted Project, Restricted Project, Restricted Project

Apr 14 2021

HazardyKnusperkeks added a comment to D92168: [clang-format] Handle statement macro expressions in switch block.

This looks okay, I think. But it should definitely add a release note and extend the documentation on statement macros.
Now I'm thinking maybe it should add a new flag to activate that behavior?

Apr 14 2021, 5:29 PM · Restricted Project
HazardyKnusperkeks added inline comments to D91950: [clang-format] Add BreakBeforeInlineASMColon configuration.
Apr 14 2021, 5:24 PM · Restricted Project, Restricted Project
HazardyKnusperkeks added a comment to D99503: [clang-format] Inconsistent behavior regarding line break before access modifier.

Look good in general, only the few comments.

Apr 14 2021, 5:18 PM · Restricted Project, Restricted Project