# Projects

User does not belong to any projects.

# User Details

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

# Yesterday

Nice trick! :)

Thu, Jun 17, 1:51 PM · Restricted Project, Restricted Project

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

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

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

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

Mon, Jun 14, 12:58 PM · Restricted Project
Mon, Jun 14, 12:54 PM · Restricted Project, Restricted Project

# Sun, Jun 13

[clang-format] Adds a formatter for aligning arrays of structs
Sun, Jun 13, 12:14 PM · Restricted Project, Restricted Project

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

Thanks for the work!

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

# Fri, Jun 11

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

Fri, Jun 11, 12:04 PM · Restricted Project

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

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

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

LGTM, but please wait for more responses.

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

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

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
Thu, Jun 10, 12:45 PM · Restricted Project, Restricted Project, Restricted Project

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

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

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] Fix PointerAlignmentRight with AlignConsecutiveDeclarations
Thu, Jun 3, 8:55 AM · Restricted Project, Restricted Project
Thu, Jun 3, 8:55 AM · Restricted Project, Restricted Project
Thu, Jun 3, 8:06 AM · Restricted Project, Restricted Project

Seems reasonable. :)

Thu, Jun 3, 1:16 AM · Restricted Project, Restricted Project
Thu, Jun 3, 1:10 AM · Restricted Project, Restricted Project

# Wed, Jun 2

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

Tue, Jun 1, 2:49 PM · Restricted Project, Restricted Project

Will do on Thursday.

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

# Mon, May 31

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

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

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

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

Sat, May 29, 9:01 AM · Restricted Project, Restricted Project
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

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
Sat, May 29, 2:10 AM · Restricted Project, Restricted Project

# Fri, May 28

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

Looks quite solid for me.

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

LGTM, but please wait for more responses.

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

# Thu, May 27

Thu, May 27, 12:52 PM · Restricted Project, Restricted Project
Thu, May 27, 4:15 AM · Restricted Project, Restricted Project
[clang-format] [NFC] realign documentation in Format.h...
Thu, May 27, 4:02 AM · Restricted Project, Restricted Project
Thu, May 27, 4:00 AM · Restricted Project, Restricted Project

# Wed, May 26

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

[clang-format][NFC] correctly sort StatementAttributeLike-macros' IO.map
Tue, May 25, 8:42 AM · Restricted Project, Restricted Project

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

Mon, May 24, 2:08 AM · Restricted Project, Restricted Project
Mon, May 24, 2:08 AM · Restricted Project, Restricted Project
Mon, May 24, 2:07 AM · Restricted Project, Restricted Project

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

Sat, May 22, 8:01 AM · Restricted Project, Restricted Project

# Thu, May 20

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

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

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

May 18 2021, 11:52 AM · Restricted Project, Restricted Project

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

May 18 2021, 11:46 AM · Restricted Project

# May 13 2021

I second that ColumnLimit breaking test case. :)

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

# May 8 2021

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
May 8 2021, 1:23 AM · Restricted Project, Restricted Project

# May 6 2021

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

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

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

# May 5 2021

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

I really like alignment! :)

May 5 2021, 12:09 PM · Restricted Project, Restricted Project
May 5 2021, 11:38 AM · Restricted Project, Restricted Project

# May 3 2021

May 3 2021, 1:27 PM · Restricted Project, Restricted Project

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

Apr 29 2021, 12:12 PM · Restricted Project, Restricted Project

# Apr 28 2021

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

Apr 28 2021, 11:20 AM · Restricted Project

# Apr 26 2021

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

LGTM but please wait for @MyDeveloperDay opinion.

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

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
Apr 21 2021, 11:27 AM · Restricted Project

# Apr 19 2021

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

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

LGTM

Apr 19 2021, 12:27 AM · Restricted Project, Restricted Project

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

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

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

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

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