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

via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 12 12:10:36 PST 2025


================
@@ -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:
+  ///    template <
+  ///        typename Foo,
+  ///        typename Bar,
+  ///        typename Baz
+  ///    >
+  ///
+  ///    false:
+  ///    template <
+  ///        typename Foo,
+  ///        typename Bar,
+  ///        typename Baz>
----------------
leijurv wrote:

I'm doing `BreakBeforeTemplateCloser` because of [your comment here](https://github.com/llvm/llvm-project/pull/118046#discussion_r1912369946)

I've changed it to an enum in this commit: https://github.com/llvm/llvm-project/pull/118046/commits/9277a685c7a0199fff20677759d663254de9189f 👍 

https://github.com/llvm/llvm-project/pull/118046


More information about the cfe-commits mailing list