================
@@ -5687,11 +5687,10 @@ bool TokenAnnotator::mustBreakBefore(const
AnnotatedLine &Line,
if (Right.is(tok::r_brace) && Left.is(tok::l_brace) &&
!Left.Children.empty()) {
// Support AllowShortFunctionsOnASingleLine for JavaScript.
- return Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None ||
- Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty
||
+ return (!Style.AllowShortFunctionsOnASingleLineOptions.Inline &&
+ !Style.AllowShortFunctionsOnASingleLineOptions.Other) ||
(Left.NestingLevel == 0 && Line.Level == 0 &&
- Style.AllowShortFunctionsOnASingleLine &
- FormatStyle::SFS_InlineOnly);
+ Style.AllowShortFunctionsOnASingleLineOptions.Inline);
----------------
owenca wrote:
```suggestion
Style.AllowShortFunctionsOnASingleLineOptions.Inline &&
!Style.AllowShortFunctionsOnASingleLineOptions.Other);
```
`& SFS_InlineOnly` was a shorthand for `SFS_Inline || SFS_InlineOnly`, so it
seems that you missed `Other`.
https://github.com/llvm/llvm-project/pull/134337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits