================
@@ -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:

In my mind that's a bit of a different option. You can see in your examples 
that you're assuming that the `>` goes on the next line, but that's what this 
PR is trying to add support for.

Like, your enum (which is totally reasonable) would switch between:

```
template <
    typename Foo, typename Bar,
    typename Baz
>
```

versus

```
template <typename Foo, typename Bar,
          typename Baz
>
```

But what I'm currently trying to add support for is:

```
template <
    typename Foo, typename Bar,
    typename Baz
>

template <typename Foo, typename Bar,
          typename Baz
>
```

versus

```
template <
    typename Foo, typename Bar,
    typename Baz>

template <typename Foo, typename Bar,
          typename Baz>
```

So I believe that should be another patch.

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

Reply via email to