Issue |
150845
|
Summary |
[clang-format] BreakTemplateDeclarations and RequiresClausePosition
|
Labels |
clang-format
|
Assignees |
|
Reporter |
csisy
|
Hello.
Trying to define a ruleset for forcing a line break after the template declaration, while allowing the requires clause to be on the same line.
The corresponding options are `BreakTemplateDeclarations` and `RequiresClausePosition`. Setting the `RequiresClausePosition` to `WithPreceding` or `SingleLine` only works if `BreakTemplateDeclarations` is **not** set to `Yes`.
In an ideal world, I could configure both, but it seems that `BreakTemplateDeclarations` is stronger.
```
BreakTemplateDeclarations: Yes
RequiresClausePosition: WithPreceding
```
Expected output:
```cpp
template <typename T> requires std::floating_point<T>
using LerpValue = ClampedValue<T, T{ 0 }, T{ 1 }>;
```
The current behavior:
```cpp
template <typename T>
requires std::floating_point<T>
using LerpValue = ClampedValue<T, T{ 0 }, T{ 1 }>;
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs