@@ -1452,6 +1476,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
FormatStyle LLVMStyle;
LLVMStyle.AccessModifierOffset = -2;
LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align;
+ LLVMStyle.AlignAfterOpenBracketBreak = {};
Hazar
@@ -1452,6 +1476,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
FormatStyle LLVMStyle;
LLVMStyle.AccessModifierOffset = -2;
LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align;
+ LLVMStyle.AlignAfterOpenBracketBreak = {};
gedar
@@ -811,10 +816,11 @@ void
ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
if (!Tok.Previous)
return true;
if (Tok.Previous->isIf())
- return Style.AlignAfterOpenBracket == FormatStyle::BAS_AlwaysBreak;
-return !Tok.Previous->i
gedare wrote:
> I don't think this is the way to go, or at least not with this name.
>
> How about going the `Custom` way?
Adding a `Custom` option to `AlignAfterOpenBracket` is an interesting proposal.
There have been some ideas floated in other Issues and PRs related to this, for
example:
*
@@ -811,10 +816,11 @@ void
ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
if (!Tok.Previous)
return true;
if (Tok.Previous->isIf())
- return Style.AlignAfterOpenBracket == FormatStyle::BAS_AlwaysBreak;
-return !Tok.Previous->i
@@ -1169,6 +1181,18 @@ template <> struct MappingTraits {
IO.mapOptional("WhitespaceSensitiveMacros",
Style.WhitespaceSensitiveMacros);
+// If AlignAfterOpenBracket was specified but AlignAfterOpenBracketBreak
+// was not, initialize the latter f
@@ -1169,6 +1181,18 @@ template <> struct MappingTraits {
IO.mapOptional("WhitespaceSensitiveMacros",
Style.WhitespaceSensitiveMacros);
+// If AlignAfterOpenBracket was specified but AlignAfterOpenBracketBreak
+// was not, initialize the latter f
https://github.com/HazardyKnusperkeks edited
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks commented:
I don't think this is the way to go, or at least not with this name.
How about going the `Custom` way?
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llv
@@ -1452,6 +1476,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind
Language) {
FormatStyle LLVMStyle;
LLVMStyle.AccessModifierOffset = -2;
LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align;
+ LLVMStyle.AlignAfterOpenBracketBreak = {};
Hazar
gedare wrote:
Rebased to main. This PR addresses several long-standing issues. It would be
great to get a review.
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/gedare updated
https://github.com/llvm/llvm-project/pull/108332
>From 70e0cbd5c648a532952ddb00a719b03a8f31160e Mon Sep 17 00:00:00 2001
From: Gedare Bloom
Date: Thu, 20 Jun 2024 17:35:39 -0600
Subject: [PATCH 1/2] Format: add AlignAfterOpenBracketOptions
Introduce new option
https://github.com/gedare updated
https://github.com/llvm/llvm-project/pull/108332
>From f21e1c62aa64ce497d5d4b500f412752eae9ceb0 Mon Sep 17 00:00:00 2001
From: Gedare Bloom
Date: Thu, 20 Jun 2024 17:35:39 -0600
Subject: [PATCH 1/2] Format: add AlignAfterOpenBracketOptions
Introduce new option
https://github.com/gedare updated
https://github.com/llvm/llvm-project/pull/108332
>From d4ea6c119580f4e153a0844f0e29cb393c340279 Mon Sep 17 00:00:00 2001
From: Gedare Bloom
Date: Thu, 20 Jun 2024 17:35:39 -0600
Subject: [PATCH 1/2] Format: add AlignAfterOpenBracketOptions
Introduce new option
gedare wrote:
ping
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
gedare wrote:
Rebased to main to pick up recent regression fixes BlockIndent/AlwaysBreak.
https://github.com/llvm/llvm-project/pull/108332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
https://github.com/gedare updated
https://github.com/llvm/llvm-project/pull/108332
>From d099408d791fef55b3064f6597bdd2fb0b4537da Mon Sep 17 00:00:00 2001
From: Gedare Bloom
Date: Thu, 20 Jun 2024 17:35:39 -0600
Subject: [PATCH 1/2] Format: add AlignAfterOpenBracketOptions
Introduce new option
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Gedare Bloom (gedare)
Changes
Introduce sub-options for `AlignAfterOpenBracketBreak` to allow for control of
`AlignAfterOpenBracket` with `AlwaysBreak` and `BlockIndent` selectively for
`if` conditional statements (as currently supported)
https://github.com/gedare created
https://github.com/llvm/llvm-project/pull/108332
Introduce sub-options for `AlignAfterOpenBracketBreak` to allow for control of
`AlignAfterOpenBracket` with `AlwaysBreak` and `BlockIndent` selectively for
`if` conditional statements (as currently supported), o
19 matches
Mail list logo