================
@@ -10848,6 +10848,21 @@ TEST_F(FormatTest, WrapsTemplateDeclarations) {
"public:\n"
" E *f();\n"
"};");
+ AlwaysBreak.RequiresClausePosition = FormatStyle::RCPS_SingleLine;
+ verifyNoChange("template <typename T> requires std::floating_point<T>\n"
+ "using LerpValue = ClampedValue<T, T{0}, T{1}>;",
+ AlwaysBreak);
+ AlwaysBreak.RequiresClausePosition = FormatStyle::RCPS_WithPreceding;
+ verifyNoChange("template <typename T> requires std::floating_point<T>\n"
+ "using LerpValue = ClampedValue<T, T{0}, T{1}>;",
+ AlwaysBreak);
+ AlwaysBreak.RequiresClausePosition = FormatStyle::RCPS_OwnLine;
+ verifyFormat("template <typename T>\n"
+ " requires std::floating_point<T>\n"
+ "using LerpValue = ClampedValue<T, T{0}, T{1}>;",
+ "template <typename T> requires std::floating_point<T>\n"
+ "using LerpValue = ClampedValue<T, T{0}, T{1}>;",
+ AlwaysBreak);
----------------
owenca wrote:
Please delete this test case. It seems redundant as `BTDS_Yes` didn't break
`RCPS_OwnLine` before.
https://github.com/llvm/llvm-project/pull/159277
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits