[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-21 Thread Björn Schäpers via cfe-commits
@@ -1452,6 +1476,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { FormatStyle LLVMStyle; LLVMStyle.AccessModifierOffset = -2; LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align; + LLVMStyle.AlignAfterOpenBracketBreak = {}; Hazar

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-14 Thread Gedare Bloom via cfe-commits
@@ -1452,6 +1476,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { FormatStyle LLVMStyle; LLVMStyle.AccessModifierOffset = -2; LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align; + LLVMStyle.AlignAfterOpenBracketBreak = {}; gedar

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-14 Thread Gedare Bloom via cfe-commits
@@ -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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-14 Thread Gedare Bloom via cfe-commits
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: *

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-13 Thread Björn Schäpers via cfe-commits
@@ -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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-13 Thread Björn Schäpers via cfe-commits
@@ -1169,6 +1181,18 @@ template <> struct MappingTraits { IO.mapOptional("WhitespaceSensitiveMacros", Style.WhitespaceSensitiveMacros); +// If AlignAfterOpenBracket was specified but AlignAfterOpenBracketBreak +// was not, initialize the latter f

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-13 Thread Björn Schäpers via cfe-commits
@@ -1169,6 +1181,18 @@ template <> struct MappingTraits { IO.mapOptional("WhitespaceSensitiveMacros", Style.WhitespaceSensitiveMacros); +// If AlignAfterOpenBracket was specified but AlignAfterOpenBracketBreak +// was not, initialize the latter f

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-13 Thread Björn Schäpers via cfe-commits
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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-13 Thread Björn Schäpers via 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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-13 Thread Björn Schäpers via cfe-commits
@@ -1452,6 +1476,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { FormatStyle LLVMStyle; LLVMStyle.AccessModifierOffset = -2; LLVMStyle.AlignAfterOpenBracket = FormatStyle::BAS_Align; + LLVMStyle.AlignAfterOpenBracketBreak = {}; Hazar

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-02 Thread Gedare Bloom via cfe-commits
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/

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-12-02 Thread Gedare Bloom via cfe-commits
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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-10-17 Thread Gedare Bloom via cfe-commits
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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-10-17 Thread Gedare Bloom via cfe-commits
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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-10-15 Thread Gedare Bloom via cfe-commits
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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-09-23 Thread Gedare Bloom via 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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-09-23 Thread Gedare Bloom via cfe-commits
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

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-09-11 Thread via cfe-commits
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)

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-09-11 Thread Gedare Bloom via cfe-commits
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