[clang] [clang-format] Rename option AlwaysBreakAfterReturnType. (PR #80827)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 12 19:19:51 PST 2024
================
@@ -677,6 +677,23 @@ TEST(ConfigParseTest, ParsesConfiguration) {
" AfterControlStatement: false",
BraceWrapping.AfterControlStatement, FormatStyle::BWACS_Never);
+ Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All;
+ CHECK_PARSE("BreakAfterReturnType: None", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_None);
+ CHECK_PARSE("BreakAfterReturnType: Automatic", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_Automatic);
+ CHECK_PARSE("BreakAfterReturnType: ExceptShortType",
+ AlwaysBreakAfterReturnType, FormatStyle::RTBS_ExceptShortType);
+ CHECK_PARSE("BreakAfterReturnType: All", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_All);
+ CHECK_PARSE("BreakAfterReturnType: TopLevel", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_TopLevel);
+ CHECK_PARSE("BreakAfterReturnType: AllDefinitions",
+ AlwaysBreakAfterReturnType, FormatStyle::RTBS_AllDefinitions);
+ CHECK_PARSE("BreakAfterReturnType: TopLevelDefinitions",
+ AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_TopLevelDefinitions);
+ // For backward compatibility:
Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All;
----------------
owenca wrote:
Redundant.
https://github.com/llvm/llvm-project/pull/80827
More information about the cfe-commits
mailing list