work properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253674
91177308-0d34-0410-b5e6-
96231b3b80d8
!Left.Children.empty())
// Support AllowShortFunctionsOnASingleLine for JavaScript.
return Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_None ||
+ Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_Empty ||
(Left.NestingLevel == 0 && Line.Level == 0 &&
Style.AllowShortFunctionsOnASingleLine ==
FormatStyle::SFS_Inline);
" }\n"
"}",
Style);
+
+ Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
+ verifyFormat("var func = function() {\n"
+ " return 1;\n"
+ "};",
+ Style);
}
TEST_F(FormatTestJS, MultipleFunctionLiterals) {