[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 13 20:10:30 PST 2024


================
@@ -3928,6 +3928,13 @@ struct FormatStyle {
   /// \version 13
   unsigned ShortNamespaceLines;
 
+  /// When AlwaysBreakAfterReturnType is None, line breaks are prevented after
+  /// short return types. This configures the character limit for a type to be
+  /// regarded as short. Note that this isn't the length of the type itself,
+  /// but the column where it finishes. I.e. it includes indentation, etc.
+  /// \version 18
+  unsigned ShortReturnTypeLength;
----------------
rmarker wrote:

Yeah, that's much nicer.

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


More information about the cfe-commits mailing list