[clang] [clang-format] Allow one indent level before explicit access labels (PR #227704)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 30 12:57:14 PDT 2026
================
@@ -24920,6 +24920,59 @@ TEST_F(FormatTest, IndentAccessModifiers) {
Style);
}
+TEST_F(FormatTest, IndentImplicitAccessModifiers) {
+ FormatStyle Style = getLLVMStyle();
+ Style.IndentAccessModifiers = true;
+ Style.IndentImplicitAccessModifiers = false;
+ Style.IndentWidth = 4;
+ Style.EmptyLineBeforeAccessModifier = FormatStyle::ELBAMS_Never;
+ Style.BreakBeforeBraces = FormatStyle::BS_Allman;
----------------
HazardyKnusperkeks wrote:
Why do you need the braces setting?
Similar to other options.
You need to actually test plain LLVM style + your option. Everything else on top is bonus (and sometimes necessary).
https://github.com/llvm/llvm-project/pull/227704
More information about the cfe-commits
mailing list