[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-28 Thread Jon Phillips via cfe-commits
jp4a50 wrote: Thanks for the reviews! Can someone please merge for me? @HazardyKnusperkeks @owenca https://github.com/llvm/llvm-project/pull/66755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-27 Thread Jon Phillips via cfe-commits
jp4a50 wrote: > You should adapt the documentation. Done. Tried to capture the original intention of the option which is to minimize (and make consistent) indentation of lambdas at block scope. This PR addresses the most obvious exception to block scope but there may be more that we can

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-26 Thread Jon Phillips via cfe-commits
https://github.com/jp4a50 updated https://github.com/llvm/llvm-project/pull/66755 >From e07d263a37ef37a21bb5cf424b14be83088eed3d Mon Sep 17 00:00:00 2001 From: Jon Phillips Date: Tue, 19 Sep 2023 10:29:57 +0100 Subject: [PATCH 1/3] [clang-format] Disable OuterScope lambda indentat

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-22 Thread Jon Phillips via cfe-commits
@@ -22537,10 +22537,12 @@ TEST_F(FormatTest, FormatsLambdas) { " }\n" "}", Style); - verifyFormat("std::sort(v.begin(), v.end(),\n" - " [](const auto , const auto ) {\n" - " return foo.baz <

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-22 Thread Jon Phillips via cfe-commits
https://github.com/jp4a50 updated https://github.com/llvm/llvm-project/pull/66755 >From e07d263a37ef37a21bb5cf424b14be83088eed3d Mon Sep 17 00:00:00 2001 From: Jon Phillips Date: Tue, 19 Sep 2023 10:29:57 +0100 Subject: [PATCH 1/2] [clang-format] Disable OuterScope lambda indentat

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-20 Thread Jon Phillips via cfe-commits
@@ -22537,10 +22537,12 @@ TEST_F(FormatTest, FormatsLambdas) { " }\n" "}", Style); - verifyFormat("std::sort(v.begin(), v.end(),\n" - " [](const auto , const auto ) {\n" - " return foo.baz <

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-20 Thread Jon Phillips via cfe-commits
@@ -22537,10 +22537,12 @@ TEST_F(FormatTest, FormatsLambdas) { " }\n" "}", Style); - verifyFormat("std::sort(v.begin(), v.end(),\n" - " [](const auto , const auto ) {\n" - " return foo.baz <

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-20 Thread Jon Phillips via cfe-commits
jp4a50 wrote: > I'm not sure I understand, looking at > https://clang.llvm.org/docs/ClangFormatStyleOptions.html#lambdabodyindentation > it seems to explicitly state it should be at the outer function scope, can > you point to a github issue this is trying to solve or is this just personal >

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-19 Thread Jon Phillips via cfe-commits
constructor initializers. >From e07d263a37ef37a21bb5cf424b14be83088eed3d Mon Sep 17 00:00:00 2001 From: Jon Phillips Date: Tue, 19 Sep 2023 10:29:57 +0100 Subject: [PATCH] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers By default, OuterScope ali

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-09-08 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 2 inline comments as done. jp4a50 added a comment. Thanks all. All comments addressed now. Please merge for me once ready. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-09-08 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 556262. jp4a50 added a comment. Minor review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-09-01 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D148131#4628719 , @HazardyKnusperkeks wrote: > But please wait for other opinions. OK sure. @owenpan, any thoughts? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-08-30 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 6 inline comments as done. jp4a50 added a comment. All comments addressed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131 ___ cfe-commits

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-08-30 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 554704. jp4a50 added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-08-25 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Hello @owenpan , @HazardyKnusperkeks . Now that https://reviews.llvm.org/D156259 is merged, please can you take a look at this change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-23 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked an inline comment as done. jp4a50 added a comment. @owenpan right you are! Missed those somehow. Made a further two changes. Hope I haven't missed anything else! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-23 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 552701. jp4a50 added a comment. Minor refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-22 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 4 inline comments as done. jp4a50 added a comment. Addressed all comments. Please let me know if there's anything else required before merging. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-22 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 552403. jp4a50 added a comment. Minor refactor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-22 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 552401. jp4a50 added a comment. Minor refactoring and comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/lib/Format/ContinuationIndenter.cpp

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-03 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. @HazardyKnusperkeks could you merge this for me assuming the build is green please? I don't have merge rights. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-03 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 546972. jp4a50 added a comment. Format files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/docs/ReleaseNotes.rst

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-08-01 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 546004. jp4a50 added a comment. Stack diff on top of https://reviews.llvm.org/D156259. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148131/new/ https://reviews.llvm.org/D148131 Files:

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-01 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 546002. jp4a50 added a comment. More CR feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-01 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:657-666 + bool DisallowLineBreaksOnThisLine = [ = this->Style, ] { +// Deal with lambda arguments in C++. The aim here is to ensure that we +// don't over-indent lambda function bodies

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 545622. jp4a50 marked an inline comment as done. jp4a50 added a comment. Formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files:

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 3 inline comments as done. jp4a50 added a comment. All comments addressed. PTAL and let me know if there are any other blockers for merge. Comment at: clang/lib/Format/ContinuationIndenter.cpp:664-666 +if ((Style.Language == FormatStyle::LK_Cpp || +

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 545594. jp4a50 added a comment. Refactor DisallowLineBreaksOnThisLine lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:664-666 +if ((Style.Language == FormatStyle::LK_Cpp || + Style.Language == FormatStyle::LK_ObjC) && +!Current.is(tok::comment) && PrevNonComment &&

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-26 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 544310. jp4a50 added a comment. Format files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/docs/ReleaseNotes.rst

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-26 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 2 inline comments as done. jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:263 State.StartOfStringLiteral = 0; + State.NoLineBreak = false; State.StartOfLineLevel = 0; HazardyKnusperkeks wrote: > Was this

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-26 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 544308. jp4a50 added a comment. Address minor review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/docs/ReleaseNotes.rst

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-07-25 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. @owenpan I've put up a patch for the bug you mentioned here: https://reviews.llvm.org/D156259 I'll rebase this change on top of that if you like the look of it. It should be fairly trivial to do. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D156259: Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-07-25 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. jp4a50 requested review of this revision. Fixes a long-standing bug:

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-07-24 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D148131#4447426 , @owenpan wrote: > In D148131#4304960 , @jp4a50 wrote: > >> Hey @MyDeveloperDay @owenpan . I'd appreciate if you guys have time to >> consider this change. It's the

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-04-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Hey @MyDeveloperDay @owenpan . I'd appreciate if you guys have time to consider this change. It's the last significant issue my team and I are tracking that's blocking our adoption of clang-format for multiple codebases that use KJ

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D146101#4270509 , @owenpan wrote: > In D146101#4268487 , @jp4a50 wrote: > >> Would appreciate someone committing for me. > > Can you rebase it? I got a conflict in ReleaseNotes.rst.

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 517868. jp4a50 added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Commit details as follows as per other diffs: Name: Jon Phillips Email: jonap2...@gmail.com Would appreciate someone committing for me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-04-12 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:333 + // enabled. + !(Current.is(TT_LambdaLBrace) && Style.BraceWrapping.BeforeLambdaBody) && CurrentState.NoLineBreakInOperand) { AFAICT, this only matters when

[PATCH] D148131: Avoid unnecessarily aggressive line-breaking when using "LambdaBodyIndentation: OuterScope" with argument bin-packing.

2023-04-12 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. jp4a50 requested review of this revision. Repository: rG LLVM Github Monorepo

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-12 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D146101#4261293 , @MyDeveloperDay wrote: > If all comments and concerns are done, then I'm inclined to accept, but I'd > like @owenpan and @HazardyKnusperkeks to give their opinion before we land > this. Sure. Thanks!

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-12 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Ping for review again plz. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-07 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 29 inline comments as done. jp4a50 added a comment. Marked comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 ___ cfe-commits

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-06 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 4 inline comments as done. jp4a50 added a comment. Just FYI this is ready for review again. I believe I've addressed all comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-05 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Following on from our discussion about new options needing motivation from public style guides, I've updated the KJ style guide to clarify its stance on braced init lists: https://github.com/capnproto/capnproto/blob/master/style-guide.md#spacing-and-bracing

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-04-05 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Thanks for accepting! Commit details as follows as per previous diff: Name: Jon Phillips Email: jonap2...@gmail.com If someone could commit for me that would be much appreciated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-04-05 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 511098. jp4a50 added a comment. Add release note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-04-04 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 2 inline comments as done. jp4a50 added a comment. In D146042#4239182 , @owenpan wrote: > In D146042#4204651 , @jp4a50 wrote: > >> I'm confident that the patch will indent all those examples

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-04-04 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 510901. jp4a50 added a comment. Tidy up docs and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-04 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/include/clang/Format/Format.h:949 + /// If unset, ``ContinuationIndentWidth`` is used. + /// \code + /// AlignAfterOpenBracket: AlwaysBreak owenpan wrote: > HazardyKnusperkeks wrote: > > jp4a50 wrote: > > >

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-04 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 510886. jp4a50 added a comment. Minor review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D147556: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-04 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 abandoned this revision. jp4a50 added a comment. Sorry - this is a duplicate of https://reviews.llvm.org/D146101 created by accident. Closing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147556/new/ https://reviews.llvm.org/D147556

[PATCH] D147556: [clang-format] Add BracedInitializerIndentWidth option.

2023-04-04 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. jp4a50 requested review of this revision. The option allows users to specify how many columns to use

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. Could I get a re-review on this one please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042 ___ cfe-commits mailing list

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-03-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 510022. jp4a50 added a comment. Alphabetical ordering. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D146101: [clang-format] Add BracedInitializerIndentWidth option.

2023-03-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/include/clang/Format/Format.h:949 + /// If unset, ``ContinuationIndentWidth`` is used. + /// \code + /// AlignAfterOpenBracket: AlwaysBreak MyDeveloperDay wrote: > did you check generating the html from the

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/docs/tools/dump_format_style.py:72 - subtype, napplied = re.subn(r'^std::vector<(.*)>$', r'\1', typestr) - if napplied == 1: -return 'List of ' + pluralize(to_yaml_type(subtype)) + match = re.match(r'std::vector<(.*)>$',

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. I've implemented BracedInitializerIndentWidth now with significantly extended test coverage (including checking that it is not applied *too* broadly). The actual implementation is just as simple as that for `DesignatedInitializerIndentWidth`. > For the yaml stuff, I

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-31 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 509982. jp4a50 added a comment. Replace DesignatedInitializerIndentWidth with BracedInitializerIndentWidth which applies to a broader range of initializers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-30 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. So at the risk of adding to the number of decisions we need to come to a consensus on, I was about to update the KJ style guide to explicitly call out the difference in indentation for designated initializers when I realized that we (both KJ code authors and

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-29 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1665-1669 + const auto DesignatedInitializerIndentWidth = + Style.DesignatedInitializerIndentWidth < 0 + ? Style.ContinuationIndentWidth + :

[PATCH] D146995: [clang-format][NFC] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.

2023-03-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. > You need to state a name and email for the commit. Name: Jon Phillips Email: jonap2...@gmail.com Also, thanks for relating the child diff to this one. I couldn't see how to do it at first but have seen the option now. Repository: rG LLVM Github Monorepo CHAN

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1665-1669 + const auto DesignatedInitializerIndentWidth = + Style.DesignatedInitializerIndentWidth < 0 + ? Style.ContinuationIndentWidth + :

[PATCH] D146995: [clang-format][NFC] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.

2023-03-28 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. If you guys are happy with this, could you please merge it for me? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146995/new/ https://reviews.llvm.org/D146995 ___ cfe-commits

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. I've removed the special-casing that I added for namespace scope statements. If I make those changes at all, I'll raise them as a follow up diff. Comment at: clang/unittests/Format/FormatTest.cpp:21953 - verifyFormat("std::sort(v.begin(), v.end(),\n"

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 508765. jp4a50 added a comment. Re-enable OuterScope lambda body indentation of lambdas in namespace scope statements. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:21952 "}", Style); + verifyFormat("void test() {\n" MyDeveloperDay wrote: > I feel like lots of these test changes could be made on their own, BEFORE

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 508762. jp4a50 added a comment. Rebase diff on top of D146995 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042 Files:

[PATCH] D146995: [clang-format] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:21978 Style); - EXPECT_EQ("SomeResult doSomething(SomeObject promise) {\n" -" return promise.then(\n" The refactored version of these test cases has

[PATCH] D146995: [clang-format] Refactor unit tests for "LambdaBodyIndentation: OuterScope" option.

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added a project: All. jp4a50 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The changes: - make the tests more concise - fix invalid C++ in the code samples - ensure line breaks in tests' code samples

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked an inline comment as done. jp4a50 added a comment. All actionable comments have been addressed. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1665-1669 + const auto DesignatedInitializerIndentWidth = + Style.DesignatedInitializerIndentWidth

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-27 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 508740. jp4a50 added a comment. Address minor review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-22 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:21918-21927 + verifyFormat("Result doSomething(Promise promise) {\n" + " return promise.then(\n" + " [this, obj = std::move(s)](int evaluated) mutable {\n" +

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-22 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D146101#4208962 , @MyDeveloperDay wrote: > What I'd really like to see, is... in the event that > `ContinuationIndentWidth` is set and I do NOTset > `DesignatedInitializerIndentWidth` , then >

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-19 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. > The style guide doesn't mention indenting designated initializers with 2 > spaces? That is a fair point. I will get it updated because the author and maintainer of that style guide is the one requesting this change since, in practice, codebases following this style

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-19 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D146042#4204513 , @owenpan wrote: > 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:

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-17 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. All comments addressed so bump on review please :) Also, a build has failed but I don't think my changes caused it - it looks like an old version of

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-17 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D146101#4195293 , @owenpan wrote: > 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? @owenpan We could

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked 2 inline comments as done. jp4a50 added inline comments. Comment at: clang/lib/Format/Format.cpp:1372 LLVMStyle.DerivePointerAlignment = false; + LLVMStyle.DesignatedInitializerIndentWidth = 4; LLVMStyle.DisableFormat = false; jp4a50 wrote:

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 505540. jp4a50 added a comment. Change DesignatedInitializerIndentWidth to a signed integer which defaults to ContinuationIndentWidth when set to -1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/Format.cpp:1372 LLVMStyle.DerivePointerAlignment = false; + LLVMStyle.DesignatedInitializerIndentWidth = 4; LLVMStyle.DisableFormat = false; MyDeveloperDay wrote: > so lets say someone is using an

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 505449. jp4a50 added a comment. Update OuterScope docs in Format.h and regenerate public docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042 Files:

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3540 + someMethod(someOtherMethod( + [](SomeReallyLongLambdaSignatureArgument foo) { jp4a50 wrote: > MyDeveloperDay wrote: > > This code may come from Format.h >

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3540 + someMethod(someOtherMethod( + [](SomeReallyLongLambdaSignatureArgument foo) { MyDeveloperDay wrote: > This code may come from Format.h Sorry, I'm not sure I

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-15 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added a comment. In D146042#4195295 , @owenpan wrote: >> The previous implementation of the option involved a hack which corrupted >> the parenthesis state stack. > > Can you link the review (e.g. `Dnn`) of the previous implementation in >

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2704 + +**DesignatedInitializerIndentWidth** (``Unsigned``) + The number of columns to use to indent designated initializers that start on a new line. Perhaps it would be better

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 505302. jp4a50 added a comment. Apply clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146101/new/ https://reviews.llvm.org/D146101 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D146101: [clang-format] Add DesignatedInitializerIndentWidth option.

2023-03-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added a project: All. jp4a50 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The option allows users to specify how many columns to use to indent designated initializers that start on a new line.

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 505264. jp4a50 added a comment. Add new code sample to demonstrate behaviour of "LambdaBodyIndentation: OuterScope" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146042/new/ https://reviews.llvm.org/D146042

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 added inline comments. Comment at: clang/lib/Format/ContinuationIndenter.cpp:1132 + State.NextToken->is(TT_LambdaLBrace) && State.Line && + State.Line->Level != 0)) { + return State.FirstIndent; Note that we do not apply "OuterScope"

[PATCH] D146042: [clang-format] Fix numerous issues with "LambdaBodyIndentation: OuterScope" option

2023-03-14 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 created this revision. Herald added a subscriber: mgrang. Herald added a project: All. jp4a50 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The previous implementation of the option involved a hack which corrupted the parenthesis

Re: [Aikiframework-devel] New System

2012-09-13 Thread Jon Phillips
://help.launchpad.net/ListHelp -- Jon Phillips 王✳ http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon +1.415.830.3884 (global) ✳ +86-187-1003-9974 (beijing) ___ Mailing list: https://launchpad.net/~aikiframework-devel Post to : aikiframework-devel

Re: [Aikiframework-devel] Updates?

2012-07-31 Thread Jon Phillips
. - These are first steps. We can apply this to our old aiki, or to aiki2, or slim-mustache. - i will be out one month (holidays!!) .but I will continue thinking about these ideas, and very concerned about Bassel. -- Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon

Re: [Milkymist-devel] Fwd: FYI: talk about our KiCad workflow at FISL 13

2012-07-31 Thread Jon Phillips
-hardware.com/people/werner/fisl13.pdf - Werner ___ http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org IRC: #milkymist@Freenode -- Jon Phillips 王✳爻气 http://fabricatorz.com ✳ skype: kidproto ✳ irc: rejon +1.415.830.3884 (global) ✳ +86-187-1003-9974

Re: [Aikiframework-devel] Updates?

2012-07-26 Thread Jon Phillips
26, 2012 at 4:32 PM, Jakub Jankiewicz jcu...@onet.pl wrote: I added few more issues, I think it will take little bit more time to finish. On Thu, 26 Jul 2012 09:29:45 +0800 Jon Phillips j...@fabricatorz.com wrote: Ok, I broke down the plan on converting openclipart more: https

Re: [Aikiframework-devel] Updates?

2012-07-26 Thread Jon Phillips
Jul 2012 17:40:04 +0800 Jon Phillips j...@fabricatorz.com wrote: Ok On Jul 26, 2012 5:32 PM, Jakub Jankiewicz jcu...@onet.pl wrote: I don't need help, it simply take bit longer if I'll do this myself. On Thu, 26 Jul 2012 16:35:44 +0800 Jon Phillips j...@fabricatorz.com wrote

Re: [Aikiframework-devel] Updates?

2012-07-25 Thread Jon Phillips
2012 23:59:46 +0800 Jon Phillips j...@fabricatorz.com wrote: Hi guys, what is the latest with aiki? How is the openclipart app coming Jcubic? Can others see the code? Roger, have you made any progress on your direction? I hope we can meet in the middle! Jon -- www: http

Re: [Aikiframework-devel] Architecture of new aiki

2012-07-25 Thread Jon Phillips
How is this going? Jon On Thu, Jul 19, 2012 at 7:52 AM, Jon Phillips j...@fabricatorz.com wrote: Cool, look forward to progress. Jakub, how is your progress? On Jul 19, 2012 5:28 AM, Roger Martín rg1...@gmail.com wrote: A question for you: Why are you interested in Aiki? What is it about

Re: [Aikiframework-devel] Updates?

2012-07-25 Thread Jon Phillips
site working in a week? it take time. There are only 3 routes / /image/ and /rpc so other links will not work. On Wed, 25 Jul 2012 15:08:49 +0800 Jon Phillips j...@fabricatorz.com wrote: What's the next steps? When will this be ready? I see mostly 404 pages. Jon On Wed, Jul 25

  1   2   3   4   5   6   7   8   9   10   >