Page MenuHomePhabricator

jp4a50 (Jon Phillips)
User

Projects

User does not belong to any projects.

User Details

User Since
Mon, Mar 13, 9:31 AM (1 w, 1 d)

Recent Activity

Sun, Mar 19

jp4a50 added a comment to D146101: [clang-format] Add DesignatedInitializerIndentWidth option..

The style guide doesn't mention indenting designated initializers with 2 spaces?

Sun, Mar 19, 5:03 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added a comment to D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.

Looks like this patch doesn't put the opening brace at the outerscope for some of the examples from the linked github issues:

$ cat .clang-format
AllowShortLambdasOnASingleLine: None
BraceWrapping:
  BeforeLambdaBody: true
BreakBeforeBraces: Custom
LambdaBodyIndentation: OuterScope
$ cat test.cpp
aaaaaaaaaaaaaaaaaaaa(1,
	             b(
	             	[]
                     {
                       return 0;
                     }));

some_function(a_really_long_name, another_long_name, a_third_long_name,
              [&](LineCallback line_callback)
{
  int a;
  int b;
});
$ clang-format test.cpp
aaaaaaaaaaaaaaaaaaaa(1, b(
                            []
                            {
                              return 0;
                            }));

some_function(a_really_long_name, another_long_name, a_third_long_name,
              [&](LineCallback line_callback)
              {
                int a;
                int b;
              });
$ 

Shouldn't the expected output be the same as the input?

Sun, Mar 19, 4:56 AM · Restricted Project, Restricted Project, Restricted Project

Fri, Mar 17

jp4a50 added a comment to D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.

All comments addressed so bump on review please :)

Fri, Mar 17, 5:06 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added a comment to D146101: [clang-format] Add DesignatedInitializerIndentWidth option..

Please see https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options. Is there a way to fix the issue without adding a new option?

Fri, Mar 17, 4:59 AM · Restricted Project, Restricted Project, Restricted Project

Wed, Mar 15

jp4a50 added inline comments to D146101: [clang-format] Add DesignatedInitializerIndentWidth option..
Wed, Mar 15, 9:56 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the diff for D146101: [clang-format] Add DesignatedInitializerIndentWidth option..

Change DesignatedInitializerIndentWidth to a signed integer which defaults to ContinuationIndentWidth when set to -1.

Wed, Mar 15, 9:54 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added inline comments to D146101: [clang-format] Add DesignatedInitializerIndentWidth option..
Wed, Mar 15, 7:24 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the diff for D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.

Update OuterScope docs in Format.h and regenerate public docs.

Wed, Mar 15, 5:27 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added inline comments to D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Wed, Mar 15, 5:21 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the summary of D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Wed, Mar 15, 4:53 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added inline comments to D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Wed, Mar 15, 4:52 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added a comment to D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.

The previous implementation of the option involved a hack which corrupted the parenthesis state stack.

Can you link the review (e.g. Dnnnnnn) of the previous implementation in the summary?

Specifically, this change fixes github issues #55708, #53212, #52846 and #59954.

Please link the issues (e.g. https://github.com/llvm/llvm-project/issues/nnnnn).

Wed, Mar 15, 4:38 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the summary of D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Wed, Mar 15, 4:36 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Mar 14

jp4a50 added inline comments to D146101: [clang-format] Add DesignatedInitializerIndentWidth option..
Tue, Mar 14, 3:47 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the summary of D146101: [clang-format] Add DesignatedInitializerIndentWidth option..
Tue, Mar 14, 3:46 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the summary of D146101: [clang-format] Add DesignatedInitializerIndentWidth option..
Tue, Mar 14, 3:35 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the diff for D146101: [clang-format] Add DesignatedInitializerIndentWidth option..

Apply clang-format.

Tue, Mar 14, 3:33 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 requested review of D146101: [clang-format] Add DesignatedInitializerIndentWidth option..
Tue, Mar 14, 3:30 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the diff for D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.

Add new code sample to demonstrate behaviour of "LambdaBodyIndentation: OuterScope"

Tue, Mar 14, 2:28 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added a reviewer for D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option: owenpan.
Tue, Mar 14, 2:16 PM · Restricted Project, Restricted Project, Restricted Project
jp4a50 added inline comments to D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Tue, Mar 14, 6:37 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 updated the summary of D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Tue, Mar 14, 6:34 AM · Restricted Project, Restricted Project, Restricted Project
jp4a50 requested review of D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option.
Tue, Mar 14, 6:26 AM · Restricted Project, Restricted Project, Restricted Project