[clang] [clang-format] Add AllowShortType option for AlwaysBreakAfterReturnType. (PR #78011)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 26 20:20:52 PST 2024


================
@@ -587,7 +589,9 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
       !State.Line->ReturnTypeWrapped &&
       // Don't break before a C# function when no break after return type.
       (!Style.isCSharp() ||
-       Style.AlwaysBreakAfterReturnType != FormatStyle::RTBS_None) &&
+       (Style.AlwaysBreakAfterReturnType != FormatStyle::RTBS_None &&
+        Style.AlwaysBreakAfterReturnType !=
+            FormatStyle::RTBS_AllowShortType)) &&
----------------
rmarker wrote:

Nice.

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


More information about the cfe-commits mailing list