================
@@ -3875,26 +3875,40 @@ bool UnwrappedLineParser::parseEnum() {
return true;
}
+ const bool ManageWhitesmithsBraces =
+ Style.BreakBeforeBraces == FormatStyle::BS_Whitesmiths;
+
if (!Style.AllowShortEnumsOnASingleLine &&
ShouldBreakBeforeBrace(Style, InitialToken,
Tokens->peekNextToken()->is(tok::r_brace))) {
addUnwrappedLine();
+
+ // If we're in Whitesmiths mode, indent the brace if we're not indenting
+ // the whole block.
+ if (ManageWhitesmithsBraces)
+ ++Line->Level;
}
// Parse enum body.
nextToken();
if (!Style.AllowShortEnumsOnASingleLine) {
addUnwrappedLine();
- Line->Level += 1;
+ if (!ManageWhitesmithsBraces)
+ ++Line->Level;
}
+ const size_t OpeningLineIndex = CurrentLines->empty()
----------------
owenca wrote:
```suggestion
const auto OpeningLineIndex = CurrentLines->empty()
```
https://github.com/llvm/llvm-project/pull/189128
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits