================ @@ -9872,9 +9872,30 @@ TEST_F(FormatTest, ReturnTypeBreakingStyle) { verifyFormat("class A {\n" " int f() { return 1; }\n" " int g();\n" + " long fooooooooooooooooooooooooooooooooooooooooooooooo::\n" + " baaaaaaaaaaaaaaaaaaaar();\n" "};\n" "int f() { return 1; }\n" - "int g();", + "int g();\n" + "int foooooooooooooooooooooooooooooooooooooooooooooooo::\n" + " baaaaaaaaaaaaaaaaaaaaar();", + Style); + + // It is now allowed to break after a short return type if necessary. + Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_AllowShortType; + verifyFormat("class A {\n" + " int f() { return 1; }\n" + " int g();\n" + " long\n" + " " + "fooooooooooooooooooooooooooooooooooooooooooooooo::" ---------------- owenca wrote:
```suggestion " fooooooooooooooooooooooooooooooooooooooooooooooo::" ``` Alternatively, you can set `ColumnLimit` to 60 and shorten the function name. https://github.com/llvm/llvm-project/pull/78011 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits