[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 13 12:00:23 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;
----------------
HazardyKnusperkeks wrote:
```suggestion
unsigned ShortReturnTypeColumn;
```
As stated in your note, this is clearer. And for a note we have `\note`.
https://github.com/llvm/llvm-project/pull/78011
More information about the cfe-commits
mailing list