[clang] [clang-format] Allow one indent level before explicit access labels (PR #227704)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 2 15:04:09 PDT 2026
================
@@ -4326,8 +4324,12 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr, bool IsJavaRecord) {
AddLevels = 2u;
break;
case FormatStyle::IAMS_AfterFirstAccessModifier:
- // Other languages keep the indentation of the old true setting.
- AddLevels = IndentAfterExplicitAccessModifier ? 1u : 2u;
+ if (Style.isCpp()) {
+ IndentAfterExplicitAccessModifier = true;
+ } else {
+ // Other languages use the same indentation as IAMS_Always.
----------------
noambouillet wrote:
Didn't know about this, thanks !
https://github.com/llvm/llvm-project/pull/227704
More information about the cfe-commits
mailing list