[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-16 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/11] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/10] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
leijurv wrote: Oh gosh, that's embarrassing. It looks like I was so focused on the column limit that I didn't cover cases where the column limit doesn't break the template fully. In other words, I would just type "Fooo" and force it onto the next line, without noticing that

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/9] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. This looks good to me but please wait for @owenca to approve https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread Owen Pan via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread Owen Pan via cfe-commits
owenca wrote: Why doesn't it break before the `>` for the example (a.cc) below? ```cpp template class C { void f() {} }; ``` Command line: ``` clang-format -style='{BreakBeforeTemplateCloser: Multiline, ColumnLimit: 26}' a.cc ``` https://github.com/llvm/llvm-project/pull/118046 _

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-12 Thread via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-12 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/8] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-12 Thread Owen Pan via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
leijurv wrote: I apologize for forgetting `clang-format-check-format` You're right that I had still missed some more cases of `verifyNoChange`. I've changed those now in https://github.com/llvm/llvm-project/pull/118046/commits/130428887e534cc3bfdfeec5846df2fd1e939667. The last two remaining `

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/7] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/6] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
@@ -6,6 +6,275 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constra

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: You can run `ninja clang-format-check-format` to make sure your patch is correctly formatted before pushing. https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread Owen Pan via cfe-commits
owenca wrote: > > I think this should be covered by BlockIndent > > My understanding from looking at past PRs to clang-format was that backwards > compatibility was a top requirement. If I changed the behavior of BlockIndent > to put the `>` on the next line, that would change a lot of existin

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff db88071a8b24ad9302659ee88383eea69a732f11 19bc40e7d824804ebcd9839cb2155a704d368e36 --e

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
leijurv wrote: Thank you for the review @owenca > I think this should be covered by BlockIndent My understanding from looking at past PRs to clang-format was that backwards compatibility was a top requirement. If I changed the behavior of BlockIndent to put the `>` on the next line, that wou

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-11 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/5] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-10 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: About the test cases: - Call `verifyFormat` instead of `verifyNoChange` whenever possible. - Don't end a test case with a newline. (Search for `\n",` and `\n")`.) - Capitalize the first word of a comment and end the comment with a `.` (or `:` if appropriate).

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-10 Thread Owen Pan via cfe-commits
owenca wrote: > > Maybe we should make it a sub-option for `BlockIndent`. I'm seeing a > > possible need for having control over other kinds of block indented > > structures such as Lambdas. I suspect the way this option has been > > implemented it interacts with the alignment options anyway.

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-09 Thread via cfe-commits
leijurv wrote: Thank you! It looks like I don't have permissions to merge, if you have them, could you? https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-09 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-06 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/4] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-04 Thread via cfe-commits
leijurv wrote: Ping :pray: https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-01 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/4] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-30 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/4] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-25 Thread via cfe-commits
@@ -11077,6 +11077,281 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + Style.ColumnLimit = 0; + verifyNoChange("template \n" +

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-25 Thread via cfe-commits
@@ -11077,6 +11077,281 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + Style.ColumnLimit = 0; + verifyNoChange("template \n" +

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-25 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { HazardyKnusperkeks wrote: Sorry missed that, didn't look for the lambda case. https://github.com/llvm/llvm-

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-25 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,281 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + Style.ColumnLimit = 0; + verifyNoChange("template \n" +

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-24 Thread via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { leijurv wrote: Sorry if I misunderstood, but, I thought I added that here: ![Screenshot_20241224-154618](ht

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-24 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { HazardyKnusperkeks wrote: This one is still missing. https://github.com/llvm/llvm-project/pull/118046 _

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-21 Thread via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { leijurv wrote: Sure! https://github.com/llvm/llvm-project/pull/118046/commits/2c3a64c8f32a5c43887db4d107a41

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-21 Thread via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + Style.ColumnLimit = 0; + verifyNoChange("template \n" +

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-21 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/4] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-19 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + Style.ColumnLimit = 0; + verifyNoChange("template \n" +

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-19 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { HazardyKnusperkeks wrote: One additional test: How about nested templates? `template typename T>` for exampl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-15 Thread via cfe-commits
leijurv wrote: Ping 🙏 https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-08 Thread via cfe-commits
@@ -11077,6 +11077,157 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { leijurv wrote: Good suggestion! I have added tests in this commit: https://github.com/llvm/llvm-project/pul

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-08 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/3] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-08 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/3] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-07 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,157 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { HazardyKnusperkeks wrote: I want to see some lambdas and template usages (not declarations). https://github

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread via cfe-commits
leijurv wrote: > I think you should add test cases with multiple `>>` closing, see > `UnderstandsTemplateParameters` for example. > > Consider trying the code snippet mentioned in #80049 as well. Thank you for the suggestion! I have integrated that test case. It indicated that I was being too

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/2] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread Gedare Bloom via cfe-commits
gedare wrote: I think you should add test cases with multiple `>>` closing, see `UnderstandsTemplateParameters` for example. Consider trying the code snippet mentioned in https://github.com/llvm/llvm-project/issues/80049 as well. https://github.com/llvm/llvm-project/pull/118046 _

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread Gedare Bloom via cfe-commits
gedare wrote: > > Yes. I followed the code that implements `AlignAfterOpenBracket: > > BlockIndent`, except applying to ClosesTemplateDeclaration. I made it a new > > setting for backwards compatibility. 👍 > > Maybe we should make it a sub-option for `BlockIndent`. I'm seeing a possible > nee

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread Gedare Bloom via cfe-commits
gedare wrote: > Yes. I followed the code that implements `AlignAfterOpenBracket: > BlockIndent`, except applying to ClosesTemplateDeclaration. I made it a new > setting for backwards compatibility. 👍 Maybe we should make it a sub-option for `BlockIndent`. I'm seeing a possible need for having

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread via cfe-commits
leijurv wrote: Yes. I followed the code that implements `AlignAfterOpenBracket: BlockIndent`, except applying to ClosesTemplateDeclaration. I made it a new setting for backwards compatibility. 👍 https://github.com/llvm/llvm-project/pull/118046 ___ cf

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread Gedare Bloom via cfe-commits
gedare wrote: Would this also be equivalent to supporting `AlignAfterOpenBracket: BlockIndent` for angle brackets? https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-06 Thread via cfe-commits
leijurv wrote: Ping :pray: https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-30 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-30 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From b254c9311fb91374a21ba6ac5d44e087e4a55e98 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-30 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From efb5b98de8817ce02a226353d9f5e36095874b27 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-30 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 4df01e5c4b5a5b4872c9d4f28c5bdce60ad79b84 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 79b3767b39d6d5d5c21bb461fb619651fb2443c5 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] [clang-format] Add BreakBeforeTemplateClose option --- clang/docs/Cl

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: leijurv (leijurv) Changes In clang-format, multiline templates have the `>` on the same line as the last parameter: ```c++ template< typename Foo, typename Bar, typename Baz> void foo() { ``` I would like to add an opt

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv ready_for_review https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 217f80766d1eeeab4195f5d79cfed79c06657166 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH] BreakBeforeTemplateClose --- clang/docs/ClangFormatStyleOptions.rst

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-11-29 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits