================ @@ -619,20 +619,39 @@ TEST(ConfigParseTest, ParsesConfiguration) { CHECK_PARSE("AllowShortBlocksOnASingleLine: true", AllowShortBlocksOnASingleLine, FormatStyle::SBS_Always); - Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline; CHECK_PARSE("AllowShortFunctionsOnASingleLine: None", - AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None); + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({})); CHECK_PARSE("AllowShortFunctionsOnASingleLine: Inline", - AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Inline); + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({/*Empty=*/true, + /*Inline=*/true, + /*Other=*/false})); CHECK_PARSE("AllowShortFunctionsOnASingleLine: Empty", - AllowShortFunctionsOnASingleLine, FormatStyle::SFS_Empty); + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({/*Empty=*/true, + /*Inline=*/false, + /*Other=*/false})); CHECK_PARSE("AllowShortFunctionsOnASingleLine: All", - AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All); + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({/*Empty=*/true, + /*Inline=*/true, + /*Other=*/true})); + CHECK_PARSE("AllowShortFunctionsOnASingleLine: InlineOnly", + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({/*Empty=*/false, + /*Inline=*/true, + /*Other=*/false})); + // For backward compatibility: CHECK_PARSE("AllowShortFunctionsOnASingleLine: false", - AllowShortFunctionsOnASingleLine, FormatStyle::SFS_None); + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({})); CHECK_PARSE("AllowShortFunctionsOnASingleLine: true", - AllowShortFunctionsOnASingleLine, FormatStyle::SFS_All); + AllowShortFunctionsOnASingleLine, + FormatStyle::ShortFunctionStyle({/*Empty=*/true, + /*Inline=*/true, + /*Other=*/true})); ---------------- owenca wrote:
Do we need to change them? https://github.com/llvm/llvm-project/pull/134337 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits