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

2025-02-06 Thread via cfe-commits
leijurv wrote: > Can this option be used to format any template like > std::remove_cv_t std::decay_t>,T0,T1>>;? Yes! In fact, that exact case is tested. https://github.com/llvm/llvm-project/commit/d2b45ce100d641a8f1690e30843bb9c5ea71ab86#diff-3f6f57cda9809a57c5b79e22b4181b3f3aaac7216262d0ef441

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

2025-02-06 Thread via cfe-commits
github-actions[bot] wrote: @leijurv Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

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

2025-02-06 Thread Owen Pan via cfe-commits
https://github.com/owenca closed 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 BreakBeforeTemplateCloser option (PR #118046)

2025-02-06 Thread Owen Pan via cfe-commits
https://github.com/owenca 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 BreakBeforeTemplateCloser option (PR #118046)

2025-02-05 Thread Owen Pan via cfe-commits
@@ -2252,6 +2252,33 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a block + /// indented template declaration. owenca wrote: ```sugges

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

2025-02-05 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/21] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

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

2025-02-05 Thread via cfe-commits
@@ -11224,6 +11224,254 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getLLVMStyle(); + // Begin with tests covering the case where there is no constraint on the + // col

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

2025-02-05 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