================
@@ -1472,6 +1483,30 @@ static void expandPresetsSpacesInParens(FormatStyle
&Expanded) {
Expanded.SpacesInParensOptions = {};
}
+static void expandPresetsShortFunctionsOnSingleLine(FormatStyle &Expanded) {
+ if (Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Custom)
+ return;
+ // Reset all flags
+ Expanded.AllowShortFunctionsOnASingleLineOptions = {};
+
+ if (Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None)
+ return;
+
+ if (Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty ||
+ Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline) {
+ Expanded.AllowShortFunctionsOnASingleLineOptions.Empty = true;
+ }
+
+ if (Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Inline ||
+ Expanded.AllowShortFunctionsOnASingleLine ==
+ FormatStyle::SFS_InlineOnly) {
+ Expanded.AllowShortFunctionsOnASingleLineOptions.Inline = true;
+ }
+
+ if (Expanded.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All)
+ Expanded.AllowShortFunctionsOnASingleLineOptions.Other = true;
----------------
irymarchyk wrote:
This is not relevant anymore.
https://github.com/llvm/llvm-project/pull/134337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits