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

2023-09-19 Thread Jon Phillips via cfe-commits
https://github.com/jp4a50 created https://github.com/llvm/llvm-project/pull/66755 By default, OuterScope aligns lambdas to the beginning of the current line. This makes sense for most types of statements within code blocks but leads to unappealing and misleading indentation for lambdas within

[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-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 &foo, const auto &bar) {\n" - " return foo.

[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 &foo, const auto &bar) {\n" - " return foo.

[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 indentation behaviour

[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 &foo, const auto &bar) {\n" - " return foo.

[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 indentation behaviour

[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 addre

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo